var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};define("template",["jquery"],function(t){"use strict";return function(e,n){var o;return o=e||"",t.each(n,function(e,n){var i,r;i="undefined"==typeof n?"undefined":_typeof(n),r=new RegExp("{{\\s*"+e+"\\s*}}","g"),"object"===i&&null!==n?t.each(n,function(t,n){var i;i=new RegExp("{{\\s*"+e+"."+t+"\\s*}}","g"),o=o.replace(i,n)}):o=o.replace(r,n)}),o}});var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};define("sfModal",["jquery","template","bootstrap"],function(t,e){"use strict";return function(n){var o,i;if("object"!==("undefined"==typeof n?"undefined":_typeof(n))){if("hide"===n)return void t(".sfmodal").modal("hide");if("toggle"===n)return void t(".sfmodal").modal("toggle");n={content:n,hideDone:!0}}o=t.extend({hideTitle:!1,hideFooter:!1,modalSize:"",title:"操作失败",content:"玩脱了",wrapper:null,$content:null,hideClose:!1,closeText:"取消",closeClass:"btn-default",backdrop:!0,closeFn:function(){},hideDone:!1,doneText:"确认",doneClass:"btn-primary",keyboard:"true",afterShow:function(){},doneFn:function(){t(".sfmodal").modal("hide")},show:function(){},shown:function(){},hide:function(){},hidden:function(){},loaded:function(){}},n),i='
",t(".sfmodal").length>0&&(t(".sfmodal").remove(),t(".modal-backdrop").remove()),o.wrapper?(t(o.wrapper).append(e(i,o)),t(o.wrapper).append('')):t("body").append(e(i,o)),o.$content?t(".sfmodal .sfModal-content").append(o.$content):t(".sfmodal .sfModal-content").html(o.content),t(".sfmodal").modal({keyboard:o.keyboard,backdrop:o.backdrop}),t(".sfmodal").on("show.bs.modal",o.show).on("hide.bs.modal",function(e){o.hide(e),o.wrapper&&t(".modal-backdrop").remove()}).on("hidden.bs.modal",o.hidden).on("loaded.bs.modal",o.loaded).on("shown.bs.modal",o.shown).modal("show"),o.afterShow&&o.afterShow(),t(".sfmodal .done-btn").click(function(e){o.doneFn(e),o.wrapper&&t(".modal-backdrop").remove()}),t(".sfmodal .close-btn").click(function(e){o.closeFn(e),o.wrapper&&t(".modal-backdrop").remove()})}}),define("mobile",["jquery"],function(t){return window.innerWidth>767?{login:null,signup:null}:(t(".hate, .like").data("toggle","false"),{login:function(){location.href="/user/login"},signup:function(){location.href="/user/register"}})}),define("isMobile",[],function(){var t;return t=function(t){var e,n;return e={Android:function(){return!!navigator.userAgent.match(/Android/i)},BlackBerry:function(){return!!navigator.userAgent.match(/BlackBerry/i)},iOS:function(){return!!navigator.userAgent.match(/iPhone|iPad|iPod/i)},Windows:function(){return!!navigator.userAgent.match(/IEMobile/i)},any:function(){return e.Android()||e.BlackBerry()||e.iOS()||e.Windows()}},n=e[t]()||!1}}),!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define("socket.io",[],t);else{var e;"undefined"!=typeof window?e=window:"undefined"!=typeof global?e=global:"undefined"!=typeof self&&(e=self),e.io=t()}}(function(){var t;return function t(e,n,o){function i(a,s){if(!n[a]){if(!e[a]){var l="function"==typeof require&&require;if(!s&&l)return l(a,!0);if(r)return r(a,!0);throw new Error("Cannot find module '"+a+"'")}var c=n[a]={exports:{}};e[a][0].call(c.exports,function(t){var n=e[a][1][t];return i(n?n:t)},c,c.exports,t,e,n,o)}return n[a].exports}for(var r="function"==typeof require&&require,a=0;aexception ")!==-1)console.log("后端返回错误信息=> ",o.responseText),"localhost"===location.hostname&&t({title:"警告:前方高能!",$content:o.responseText,hideClose:!0,modalSize:"modal-lg"});else if(o.responseJSON&&1===o.responseJSON.status){if(p=o.responseJSON,!p.data)return;var d=p.data[0];if(i.url.indexOf("/user/stat")===-1&&"login"===d)require("main").register();else if("form"===d&&p.data[1].hasOwnProperty("captcha")&&1===_.keys(p.data[1]).length)captchaPostData.api=i.url,captchaPostData.data=i.data,t({modalSize:"modal-sm",title:p.data[1].captcha,content:"",hideClose:!0,doneText:"确认并提交",doneFn:function(){var t;return t=$("#captchaPostForm").find("input[name=captcha]"),captchaPostData.captcha=t.val(),$.post("/api/captcha/check",{captcha:captchaPostData.captcha},function(e){if(!e.status)return e.data?$.post(captchaPostData.api,captchaPostData.data+"&captcha="+captchaPostData.captcha,function(t){return window.captchaPostData={},t.data.hasOwnProperty("url")?location.href=t.data.url:location.reload()}):(t.addClass("error"),console.log("验证码错误"),$(".reloadCaptcha").trigger("click"))})}});else if("robot"===d)location.href="/stop-robot";else if("unactivated"===d)t("hide"),$("#activate").modal("show");else if("nonBlocked"===d)t(p.data[1]);else if("access"===d)t({title:p.data[1][0],content:p.data[1][1],hideClose:!0});else if("form"===d){var h=i.url.split("?")[0];u=i.url.split("/")[2],u=u.split("?")[0],l=new RegExp("[?&]_="+n._),c=i.url.replace(l,""),r=!0;var f=p.data[1];$.each(f,function(t,e){var n,o,i,a;if("captcha"===t&&($("[name=captcha]").parents(".form-group").show(),$(".captcha").parent("a").click()),i=t.toLowerCase().replace(/\b[a-z]/g,function(t){return t.toUpperCase()}),"tags"===t&&"必须填写标签"===e)return void $("#article .sf-typeHelper, #question .sf-typeHelper , #live .sf-typeHelper, #liveSeries .sf-typeHelper, .blog-post .sf-typeHelper, .sf-typeHelper--fortags").addClass("error").after(''+e+"");if("cap"===t)return $('input[name="cap"]').closest(".form-group").find(".help-block.err").remove(),$(".captchaInput").addClass("has-error"),$('input[name="cap"]').closest(".form-group").addClass("has-error"),void $('input[name="cap"]').addClass("error").after(''+e+"");if("list"===t)return void $("#liveSeries .liveseries-select").addClass("error").after(''+e+"");if(a="#"+u+i,0===$(a).length&&(a="#"+u.replace(/s$/,"")+i),o=$("form#"+u+" *[name="+t+"]").not("[type=hidden]").parents(".form-group"),0===o.length&&(o=$("form#"+u.replace(/s$/,"")+" *[name="+t+"]").not("[type=hidden]").parents(".form-group")),n=$('form[action="'+h+'"] *[name='+t+"]").not("[type=hidden]").parents(".form-group"),n.length||(n=$('form[action="'+c+'"] *[name='+t+"]").not("[type=hidden]").parents(".form-group"),n.length||(n=$('.form[action="'+h+'"] *[name='+t+"]").not("[type=hidden]").parents(".form-group"),n.length||(n=$("form *[name="+t+"]").not("[type=hidden]").parents(".form-group"),n.length||(n=$("form *[data-name="+t+"]").not("[type=hidden]").parents(".form-group"))))),$(a).length)$(a).addClass("error").attr("data-error",e),0===$(a).next(".error--msg").length&&$(a).after(''+e+"");else if(o.length){o.find(".help-block.err").remove(),o.addClass("has-error");var s=o.find("[name="+t+"]").not("[type=hidden]"),l=s.closest(".input-group");l.length>0?l.after(''+e+""):s.after(''+e+"")}else if(n.length)n.find(".help-block").remove(),n.addClass("has-error"),n.find(".input-group").length>0?n.find(".input-group").after(''+e+""):(n.find("[name="+t+"]").not("[type=hidden]").parents(".form-group").append(''+e+""),n.find("[data-name="+t+"]").not("[type=hidden]").parents(".form-group").append(''+e+""));else if($("form").length&&!$("form").hasClass("header-search")){if($("form#"+u+" *[name="+t+"]").not("[type=hidden]").siblings(".error--msg").remove(),$("form#"+u+" *[name="+t+"]").not("[type=hidden]").addClass("error").attr("data-error",e).after(''+e+""),1===$("form").length&&$("form").hasClass("header-search")){var p=$(".form *[data-name="+t+"]");0==p.length&&(p=$(".form *[name="+t+"]"));var d=p.closest(".form-group");d.addClass("has-error"),d.find(".err").remove(),p.after(''+e+"")}}else if($(".form").length){var f=$(".form *[data-name="+t+"]");0==f.length&&(f=$(".form *[name="+t+"]"));var m=f.closest(".form-group");m.hasClass("err-inline")?(m.addClass("has-error"),m.find(".err").remove(),f.after(''+e+"")):(m.addClass("has-error"),m.find(".err").remove(),f.after(''+e+""))}r&&($(a).length?$(a).focus():(n.length&&n.find("[name="+t+"]").not("[type=hidden]").focus(),o.length&&o.find("[name="+t+"]").not("[type=hidden]").focus(),r=!1))})}else a=["limit","lock","author","rank","account"],_.find(a,function(t){return t===d})?$.get("/api/errorMessage",{type:d,key:p.data[1]},function(e){if(e.data)return t({title:e.data[0],content:e.data[1],hideClose:!0})}):t({title:d,content:p.data[1],hideClose:!0})}})}),define("header",["main","sfModal","isMobile","underscore"],function(t,e,n,o){$(".opts__item.user").first().on("touchend",function(t){n("any")&&$(this).find(".dropdown-avatar-menu").toggle()}),$(".dropdown-avatar-menu").first().on("touchend",function(t){n("any")&&t.stopPropagation()}),$(".3rdLogin").click(function(t){t.preventDefault(),window.open($(this).attr("href"),"_blank","toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=600,height=500")}),$(".menu__item--more a").first().on("click",function(t){t.preventDefault()});var i='\n\n <% _.each(data,function(d){ %>\n\n ',r=function(){return $.get("/api/activity/recommend",function(t){if(0==t.status){var e=o.template(i)(t);$(".dropdown-block").append(e),$(".dropdown-content-menu").css("height")<$(".dropdown-content-recommend").css("height")&&$(".dropdown-content-menu").css("height",$(".dropdown-content-recommend").css("height")),t.data.length||$(".dropdown-content-recommend").addClass("hidden")}}),(r=function(){})()};$(".menu__item--more").hoverIntent(function(){$(this).find(".dropdown-block").removeClass("hidden"),r()},function(){$(this).find(".dropdown-block").addClass("hidden")},null,1),$(".hoverDropdown").hoverIntent(function(){$(this).find(".dropdown-avatar-menu").removeClass("hidden")},function(){$(this).find(".dropdown-avatar-menu").addClass("hidden")},null,1),$(".dropdownBtn").click(function(t){var e;$(this).parent(".hoverDropdown").hasClass("open")&&(t.preventDefault(),e=$(this).attr("href"),t.ctrlKey||t.metaKey?window.open(e):location.href=e)}),$("#shouldGoTo").on("click",function(t){var e=$(this),n=e.data("type");$("body").hasClass("news-list");switch(n){case"blog":location.href="/write";break;case"qa":$(".site-ask-btn").length>0?location.href=$(".site-ask-btn").attr("href"):location.href="/ask";break;case"news":location.href="/submit";break;case"note":location.href="/record";break;default:$("body").hasClass("user-note")?location.href="/record":location.href="/ask"}}),$(".header-search input").on("focus",function(t){t.preventDefault(),$(".sf-header").addClass("search-open")}),$(".header-search input").on("blur",function(t){t.preventDefault(),$(".sf-header").removeClass("search-open")}),function(){var t=["/lives","/news"];t.forEach(function(t){!function(t){var e="navItemHighlight"+t,n=$('.sf-header--index [href="'+t+'"]');$(".header-response").length||(localStorage.getItem(e)||n.addClass("menu__item--new-show"),n.on("click",function(){localStorage.getItem(e)||localStorage.setItem(e,1)}))}(t)})}(),$("#live__nav--newest").on("click",function(t){var e=$(this);ddosMode?e.removeClass("livemenu__item--new-show"):socket.emit("check_live",function(){e.removeClass("livemenu__item--new-show")})}),$('.sf-header--index [href="/lives"]').on("click",function(t){var e=$(this);ddosMode?e.removeClass("menu__item--new-show"):socket.emit("check_live",function(){e.removeClass("menu__item--new-show")})})}),jQuery(function(t){t(document).ready(function(){var e=[],n=[],o=0,i="",r="",a="",s=null,l=0,c=0,u=0,p=0,d=0;t(window).scroll(function(e){var n=t(this).scrollTop();i=n>o?"down":"up",o=n}),t.fn.stickUp=function(e){t(this).addClass("stuckMenu");var o=0;if(null!=e){for(var i in e.parts)e.parts.hasOwnProperty(i)&&(n[o]=e.parts[o],o++);0==o&&console.log("error:needs arguments"),r=e.itemClass,a=e.itemHover,null!=e.topMargin?"auto"==e.topMargin?p=parseInt(t(".stuckMenu").css("margin-top")):isNaN(e.topMargin)&&e.topMargin.search("px")>0?p=parseInt(e.topMargin.replace("px","")):isNaN(parseInt(e.topMargin))?(console.log("incorrect argument, ignored."),p=0):p=parseInt(e.topMargin):p=0,s=t("."+r).size()}l=parseInt(t(this).height()),c=parseInt(t(this).css("margin-bottom")),u=parseInt(t(this).next().closest("div").css("margin-top")),d=t(this).offset()?parseInt(t(this).offset().top):null},t(document).on("scroll",function(){function o(o){contentView=.4*t("#"+n[o]).height(),testView=e[o]-contentView,varscroll>testView?(t("."+r).removeClass(a),t("."+r+":eq("+o+")").addClass(a)):varscroll<50&&(t("."+r).removeClass(a),t("."+r+":eq(0)").addClass(a))}if(varscroll=parseInt(t(document).scrollTop()),null!=s)for(var h=0;h\n\n <% }) %>\n<%= d.name %>
\n\n <%= d.cityName %> · <%= d.startDate %> <%= d.startWeek %> <% if(d.isSignFinished == 0){ %> · 报名中 <%}%>\n\n\n 查看更多活动\n\ne[h]-50&&varscroll0&&d<=varscroll+p+10&&t("#footer").offset().top>varscroll+t(".ad-should-be-fixed").height()+66&&(t(".stuckMenu").addClass("isStuck"),t(".stuckMenu").next().closest("div").css({"margin-top":l+c+u+"px"},10),t(".stuckMenu").css("position","fixed"),t(".isStuck").css({top:"10px"},10,function(){})),varscroll+p+10 关注微信号
',html:!0,placement:"top",trigger:"hover"}),t(".weixin-popover-qrcode").mouseover(function(e){t(this).popover("show")}),function(){d=function(){t(".opts__item--message").removeClass("hide"),t.get("/api/notifications",function(e){var n,o,i,r;e.status||(e.data=null!=(o=e.data)?o:[],i={data:e.data,unread:{general:_.filter(e.data.general,function(t){return 0===parseInt(t.viewed)}).length,ranked:_.filter(e.data.ranked,function(t){return 0===parseInt(t.viewed)}).length,followed:_.filter(e.data.followed,function(t){return 0===parseInt(t.viewed)}).length,comment:_.filter(e.data.comment,function(t){return 0===parseInt(t.viewed)}).length}},r=_.reduce(i.unread,function(t,e){return t+e},0),r>0&&t(".opts__item--message .message-ingore-all").removeClass("hide"),t("#messageGeneral").html(_.template(t("#messageGeneralTpl").html())(i.data)),t("#messageComment").html(_.template(t("#messageCommentTpl").html())(i.data)),t("#messageRanked").html(_.template(t("#messageRankedTpl").html())(i.data)),t("#messageFollowed").html(_.template(t("#messageFollowedTpl").html())(i.data)),t(".opts__item--message-loading").remove(),n={},t(".mCustomScrollbar-message").mCustomScrollbar({scrollInertia:0,callbacks:{onScroll:function(){var e,o,i;if(i=this.mcs.topPct,o=t(this).data("proto"),n[o]=n[o]||2,i>55&&n[o]!==-1){if(console.log(o,i,"ajax page "+n[o]),e="/api/notifications?type="+o+"&page="+n[o],window.__api===e)return;return window.__api=e,t.get(e,function(e){var i,r;if(!e.status)return i=e.data[o],i.length>0?(r=_.template(t("#item--"+o).html())(e.data),t(".tab-pane.active .mCSB_container").append(r),n[o]++):n[o]=-1})}}}}))})},t(".opts__item--message .message-ingore-all").on("click",function(){var e;e=t(this),t.post("/api/notifications/all/view",function(n){return d(),t(".notice-dot").addClass("hide"),e.addClass("hide")})}),t(".opts__item--message").on("click",".message__btn--follow",function(){var e,n;return e=t(this),n=e.data("id"),e.addClass("disabled"),t.post("/api/user/"+n+"/follow",function(t){return d(),e.removeClass("disabled")})}),t(".opts__item--message").on("click",".message__btn--unfollow",function(){var e,n;return e=t(this),n=e.data("id"),e.addClass("disabled"),t.post("/api/user/"+n+"/follow/cancel",function(t){return d(),e.removeClass("disabled")})}),t(".dropdown-toggle-message").on("click",function(e){var n;return e.preventDefault(),n=t(".opts__item--message"),"undefined"!=typeof v&&v.emit("read"),r.titleRender.clear("message"),r.titleRender.clear("event"),"none"!==n.css("display")?n.addClass("hide"):(d(),t.get("/api/notifications/viewed",function(e){var n;if(n=null,!e.status)return _.each(e.data,function(e,o){if(e)return n?(n=t(".notice-dot-"+o),n.removeClass("hide"),n.removeClass("notice-dot--special")):(n=t(".notice-dot-"+o),n.addClass("notice-dot--special"),n.closest("a[role='tab']").trigger("click"))})}))}),t(".opts__item--message a[role='tab']").on("click",function(e){var n;if(t(".opts__item--message .active").not(".btn").removeClass("active"),t(this).addClass("active"),t(this).find(".notice-dot.hide").length>0&&0===t(this).find(".notice-dot--special").length);else if(t(this).find(".notice-dot").addClass("hide"),n=t(this).attr("href"),"#messageRanked"===n&&t.post("/api/notifications/viewed?type=ranked"),"#messageComment"===n&&t.post("/api/notifications/viewed?type=comment"),"#messageGeneral"===n&&t.post("/api/notifications/viewed?type=general"),"#messageInbox"===n&&t.post("/api/notifications/viewed?type=inbox"),"#messageFollowed"===n)return t.post("/api/notifications/viewed?type=followed")}),t("body").on("click",function(e){"none"!==t(".opts__item--message").css("display")&&0===t(e.target).parents(".message").length&&t(".opts__item--message").addClass("hide")})}(),function(){var e=function(){t(".opts__item--letter").removeClass("hide"),t.get("/api/messages",function(e){if(!e.status){t("#messageInbox").html(_.template(t("#messageInboxTpl").html())({inboxes:e.data})),t(".opts__item--letter-loading").remove();var n=_.filter(e.data,function(t){return 0===parseInt(t.viewed)}).length;n>0&&t(".opts__item--letter .message-ingore-all").removeClass("hide")}})};t("#messageInbox").on("click","li",function(){var e,n;if(e=t(this),n=e.data("click"),Boolean(n))return location.href=n}),t(".opts__item--letter .message-ingore-all").on("click",function(){var n;n=t(this),t.post("/api/messages/all/view",function(t){e(),n.addClass("hide")})}),t(".dropdown-toggle-letter").on("click",function(n){n.preventDefault();var o=t(".opts__item--letter");"none"!==o.css("display")?o.addClass("hide"):e()}),t("body").on("click",function(e){"none"!==t(".opts__item--letter").css("display")&&0===t(e.target).parents(".letter").length&&t(".opts__item--letter").addClass("hide")}),t("#settings-btn").click(function(){t(".opts__item--letter").toggleClass("hide")})}(),"/tags"===t(".nav__item--more>a").attr("href")||(t("body").on("click",function(e){if("none"!==t(".tag-mgr__box").css("display")&&0===t(e.target).closest(".nav__item--more").length&&0===t(e.target).closest(".tag-mgr__box").length)return t(".nav__item--more").trigger("click")}),t(".tag-mgr__query").on("keyup",function(e){var n,o,i,r;return n=t(this), r=n.data("tags"),o=t(this).val(),i=function(e){var n,i,a;if(a='<%= name %> ',n=_.filter(r,function(t){return t.name.search(e)!==-1}),i=_.reduce(n,function(t,e){return t+_.template(a)(e)},""),t(".tag-mgr__list").html(i),t(".tag-mgr__list li").length>0&&o.length>0)return t(".tag-mgr__list li:first-child").addClass("active")},m.inputT&&clearTimeout(m.inputT),m.inputT=setTimeout(function(){return i(o)},100)}),t(".tag-mgr__list").on("mouseover",function(){if(t(".tag-mgr__list li").length>1)return t(".tag-mgr__list li.active").removeClass("active")}),m={inputT:0,t:0},t(".nav__item--more").on("click",function(){var e,n,o;return n=t(this),e=t(".tag-mgr__box"),o=Number(n.data("open")),o?e.addClass("hide"):(e.removeClass("hide"),t(".tag-mgr__query").focus()),t(this).data("open",Number(!o))})),t(".js__action--complain").on("click",function(){return e({title:"我要申诉",content:_.template(t("#js__action--complain-tpl").html()),doneFn:function(){return t(".complain__form").submit()}})}),t(".js__view--selector").on("click",function(){var e;return e=t(this).data("action"),t.cookie("view",e),location.reload()}),t.cookie("view")&&t(".js__view--selector").removeClass("hidden-sm").removeClass("hidden-md").removeClass("hidden-lg"),s=function(){var t,e,n;n="test",e=window.sessionStorage;try{return e.setItem(n,"1"),e.removeItem(n),!0}catch(e){return t=e,!1}},g=function(e){var n;s()&&(e>500||(localStorage&&(n=localStorage.getItem("show-app-promotion-bar"),n=n||!0,n!==!0?t(".app-promotion-bar").hide():t(".app-promotion-bar").show()),t("body").on("click",".close",function(){t(".app-promotion-bar").hide(),localStorage.setItem("show-app-promotion-bar",!1)}),t("body").on("click",".icon",function(){t(".app-promotion-bar").hide(),localStorage.setItem("show-app-promotion-bar",!1)})))},a=function(t){var e,n;switch(n="",e=new Date(t),e.getDay()){case 0:n="周日";break;case 1:n="周一";break;case 2:n="周二";break;case 3:n="周三";break;case 4:n="周四";break;case 5:n="周五";break;case 6:n="周六"}return n},l=function(){e({title:"登录",doneText:"登录",hideClose:!0,hideDone:!0,hideFooter:!0,content:t("#loginModal").text(),show:function(){return t("input[name=username]").focus(),window.ga&&ga("send","event","login modal","show","login modal"),t("[name=mail]").first().focus(),t("#loginShowMore").click(function(e){e.preventDefault(),t(this).hide(),t(this).siblings().removeClass("hidden")}),t(".sfmodal .widget-login a").click(function(e){e.preventDefault(),window.open(t(this).attr("href"),"_blank","toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=600,height=500")}),t("#loginReloadCaptcha").click(function(){t(this).find("img").attr("src","/user/captcha?w=145&h=34")})}}),t(".register-mail").typeHelperOld({emailMode:!0,onlyResult:!1})},c=function(){e({title:"注册",doneText:"登录",hideClose:!0,hideDone:!0,hideFooter:!0,content:t("#registerModal").text(),show:function(){return setTimeout(function(){t("input[name=name]").focus()},0),window.ga&&ga("send","event","login modal","show","login modal"),t("[name=mail]").first().focus(),t("#loginShowMore").click(function(e){e.preventDefault(),t(this).hide(),t(this).siblings().removeClass("hidden")}),t(".sfmodal .widget-login a").click(function(e){e.preventDefault(),window.open(t(this).attr("href"),"_blank","toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=600,height=500")}),t("#login-name").on("input",function(e){var n=/^[0-9]{11}$/;n.test(e.target.value.trim())?(t(".phone-register-only").removeClass("hidden"),t(this).closest("form").attr("action","/api/user/phone/register"),t("[name=register_type]").val("phone"),t("#login-name").attr("name","phone")):(t(".phone-register-only").addClass("hidden"),t(this).closest("form").attr("action","/api/user/register"),t("[name=register_type]").val("mail"),t("#login-name").attr("name","mail"))}),t("#loginReloadCaptcha").click(function(){t(this).find("img").attr("src","/user/captcha?w=145&h=34")})}}),t(".register-mail").typeHelperOld({emailMode:!0,onlyResult:!1})},u=function(){e({modalSize:"modal-md",title:"绑定手机号",doneText:"绑定手机号",hideClose:!0,hideDone:!0,hideFooter:!0,content:t("#bindPhoneModal").text(),doneFn:function(){var e=t(".form__bindphone-apply").serializeArray(),n={};e.map(function(t){n[t.name]=t.value}),t.post("/api/user/phone/bind/check",n,function(e){if(e.status){var n=e.data[1];n.phone&&t("phone").parents(".form-group").addClass("has-error").find(".help-block").html(n.phone)}else alert("绑定成功"),location.reload()})}})},p=function(){e({modalSize:"modal-md",title:"手机验证码登陆",doneText:"绑定",content:t("#phoneLoginModal").text(),doneFn:function(){var e=t(".form__bindphone-apply").serializeArray(),n={};e.map(function(t){n[t.name]=t.value}),t.post("/api/user/phone/bind/check",n,function(t){t.status||(alert("绑定成功"),location.reload())})}})},f=function(){this.title=t("title"),this.titleText=this.title.html(),this.map={}},f.prototype._render=function(){count=0;for(k in this.map)count+=parseInt(this.map[k]);this.title.html((count>0?"("+(count>=100?"...":count)+") ":"")+this.titleText)},f.prototype.set=function(t,e){this.map[t]=e,this._render()},f.prototype.clear=function(t){delete this.map[t],this._render()},t(".addWeek").each(function(e,n){t(this).append(" "+a(t(this).html()))}),t('[data-toggle="tooltip"]').tooltip({container:"body"}),t("img.lazy").lazyload({effect:"fadeIn"}),window.oauthLogin=function(t){location.hostname.indexOf("segmentfault")!==-1?location.reload():location.href="/"},window.oauthRegister=function(t){location.href="/user/bind"},r={_:window.SF.token,staticUrl:window.SF.staticUrl,userId:t("#SFUserId").attr("value"),userRank:t("#SFUserRank").attr("value"),login:n.login||l,register:c,bindphone:u,phonelogin:p,titleRender:new f},t(document).ajaxError(function(e,n,o){413===n.status?(t("#uploading")&&t("#uploading").text(""),alert("文件大小或尺寸超出限制,请修改后重新上传!")):console.log("Ajax "+n.status+": ",o.url)}),t(document).ajaxSend(function(t,e,n){n.url.indexOf("?")===-1?n.url=n.url+"?_="+r._:n.url=n.url+"&_="+r._}),t("body").delegate("form","submit",function(e){var n;n=t(this),n.attr("method")&&n.attr("action")&&(e.preventDefault(),n.find("button[type=submit]").attr("disabled","disabled"),t.ajax({url:n.attr("action"),type:n.attr("method"),data:n.serialize(),success:function(t){n.find("button[type=submit]").removeAttr("disabled"),0===t.status&&("/api/user?do=login"===n.attr("action")&&"/user/login"!==location.pathname?window.location.reload():/^\//.test(t.data)?window.location=t.data:window.location.reload())}}))}),t("body").delegate("form input, form textarea, .form input, .form textarea","keydown",function(e){t(this).removeClass("error"),t(this).parents(".form-group").removeClass("has-error"),t(this).next(".help-block.err").remove(),t(this).next(".error--msg").remove(),t(this).parents(".form-group").find(".help-block.err").remove()}),t("#backtop").click(function(){return t("body,html").animate({scrollTop:0}),!1}),t(document).scroll(function(){t(this).scrollTop()>720?t("#backtop").removeClass("hidden"):t("#backtop").addClass("hidden")}),t(".topframe").length&&t(".topframe .close").click(function(e){t(this).parent().remove(),0!==t(".topframe").length&&t(".topframe .content").text()||t("body").removeClass("have-notify")}),window.SFHacker={setOldVersion:function(){t.cookie("v","old"),window.location.reload()},unSetOldVersion:function(){t.removeCookie("v",{path:"/"}),window.location.reload()},makePureTextarea:function(){t.cookie("typemode","native"),window.location.reload()},unMakePureTextarea:function(){t.removeCookie("typemode",{path:"/"}),window.location.reload()}},t("body").on("click",".SFLogin",function(t){t.preventDefault(),r.register()}),t("body").on("click",".SFRegister",function(t){t.preventDefault(),r.login()}),t("body").on("click",".phoneLogin",function(t){t.preventDefault(),r.phonelogin()}),t(".notlogin").on("click",function(e){e.preventDefault();var n=t(this);r.login(function(){n.removeClass("notlogin")})}),t(".captchaInput img").on("click",function(){var e=Date.parse(new Date);t(this).attr("src","/user/captcha?w=240&h=50&t="+e)});var y=function(t){var e=t.closest("form"),n=e.find(".captchaInput .captcha"),o=n.data("src");n.attr("src",o),e.find(".captchaInput").removeClass("hidden")};t("body").on("focus",'input[name="phone"]',function(){var e=t(this);e.closest("form").find(".captchaInput .captcha").attr("src")||y(e)}),function(){window.isBindPage||t("body").on("click",".login-modal .login-wrap .js-user-login__phone-vaild-btn",function(){var e=t(this),n=60,o=void 0,i=function(){n>1?(n--,e.text(n+"s")):(clearInterval(o),e.text("获取验证码"),e.prop("disabled",!1))},r={},a=t(this).closest("form").find("input:not(.hide,hidden)");a.each(function(){var e=t(this),n=e.attr("name"),o=e.val();r[n]=o}),t.post("/api/user/phone/register/send",r,function(t){t.status||(e.prop("disabled",!0),o=setInterval(i,1e3))})})}(),t("body").on("click",".bindphone-model .user-bind__phone-vaild-btn",function(){var e=t(this),n=60,o=void 0,i=function(){n>1?(n--,e.text(n+"s")):(clearInterval(o),e.text("获取验证码"),e.prop("disabled",!1))};t.post("/api/user/phone/bind",{phone:t(".bindphone--phone").val()},function(t){t.status||(e.prop("disabled",!0),o=setInterval(i,1e3))})}),t("body").on("click",".phonelogin-modal .user-bind__phone-vaild-btn",function(){var e=t(this),n=60,o=void 0,i=function(){n>1?(n--,e.text(n+"s")):(clearInterval(o),e.text("获取验证码"),e.prop("disabled",!1))};t.post("/api/user/phone/phoneloginsend",{phone:t(".phonelogin--phone").val()},function(t){t.status||(e.prop("disabled",!0),o=setInterval(i,1e3))})}),h=function(e,n,o,i){var r;r=e,r.on("shown.bs.modal",function(){return t.post("/api/user/active/alert",function(t){})}),r.length>0&&t(".write-btns a").each(function(e,n){t(this).click(function(t){return r.modal("show"),!1})}),r.find(".activate-form").on("submit",function(e){var n;return e.preventDefault(),n=t(this),t.post(o,{mail:n.find(".mail").val()},function(e){0===e.status&&(n.parent().find(".session-mail").text(n.find(".mail").val()),t(".activate-showmail").show(),t(".activate-form").hide(),location.reload())}),!1}),r.find(".activate-resend",r).click(function(e){var o,r,a,s;r=t(this),o=r.siblings("span").find("span"),a=void 0,s=void 0,a=120,a--,t.post(n,function(e){var n;0===e.status?(t(".company-activete-tips").length&&t(".company-activete-tips").html(null!=(n=''+e.message)?n:e.data[1]+""),i&&i(),s=setInterval(function(){return 0===a?(clearInterval(s),r.show(),r.siblings("span").hide()):(r.hide(),r.siblings("span").show(),o.text(a--))},1e3)):(t(".company-activete-tips").length&&(e.message?t(".company-activete-tips").html(''+e.message+""):t(".company-activete-tips").html(''+e.data[1]+"")),setTimeout(function(){return t(".company-activete-tips").length&&t(".company-activete-tips").html('激活邮件已发送 (120)'),r.show()},9e5))})})},h(t("#activate"),"/api/user/reactivate","/api/user/activate/mail"),h(t("#companyActivate"),"/api/company/reactivate","/api/settings/mail/edit"),t(".side-ask [class*=btn-sn-]").click(function(e){e.preventDefault(),window.open(t(this).attr("href"),"_blank","toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=600,height=500")}),function(){t("body").on("click",".activate__step--init input[name=activate_type]",function(){var e=t(this),n=e.val();t('.activate__step--init .form-group[data-type="'+n+'"]').removeClass("hide"),"phone"===n?t(".activate__step--init .form-group[data-type=mail]").addClass("hide"):"mail"===n&&t(".activate__step--init .form-group[data-type=phone]").addClass("hide")}),t("body").on("click",".activate__step--init .activate__step-code-btn",function(){var e=void 0,n=t(this),o=(t(".activate__step-code-value"),t(".activate__step-phone-value")),i=60,r=function(){i<1?(n.text("获取验证码"),n.prop("disabled",!1),clearInterval(e)):n.text(--i+"s")};n.prop("disabled",!0),t.post("/api/user/phone/activate/send",{phone:o.val()},function(t){t.status?n.prop("disabled",!1):e=setInterval(r,1e3)})}),t("body").on("click",".activate-change",function(e){t(".activate-showmail").hide(),t(".activate-form").show()}),t("#activate").on("show.bs.modal",function(){var e=t(".activate__step--init>form").serializeArray(),n={};e.map(function(t){n[t.name]=t.value}),n.mail&&n.mail.length>0&&(t(".activate__step--init input[value=mail]").trigger("click"),setTimeout(function(){},50),t(".activate__step--init .btn-primary").trigger("click"))}),t("body").on("click",".activate__step--init .btn-primary",function(){var e=t(this),n=t(".activate__step--init>form").serializeArray(),o={};if(n.map(function(t){o[t.name]=t.value}),o.hasOwnProperty("activate_type"))if("mail"===o.activate_type){o={mail:o.mail};var i=function(e,n){t(".activate__step--mail .session-mail").text(e);var o="",i={"mail.google.com":["gmail.com"],"mail.qq.com":["qq.com","vip.qq.com","foxmail.com"],"mail.163.com":["163.com"],"mail.126.com":["126.com"],"mail.sina.com":["sina.com","vip.sina.com","sina.cn"],"mail.sohu.com":["sohu.com"],"mail.139.com":["139.com"],"mail.wo.com.cn":["wo.com.cn"],"mail.189.cn":["189.cn"],"mail.21cn.com":["21.cn"],"mail.aliyun.com":["aliyun.com"],"mail.yahoo.com":["yahoo.com"]};for(var r in i){var a=i[r],s=a.find(function(t){return t===e.split("@")[1]});s&&(o=r)}o.length>0?t(".activate__step--mail .activate_step-mail-goto").attr("href","http://"+o):t(".activate__step--mail .activate_step-mail-goto").hide();var l="mailto:pr@segmentfault.com?subject=邮箱 "+e+" 无法激活&body=请描述具体内容";t(".activate__step-contact").attr("href",l);var c=t(".activate__step-reactivate-btn");n||c.addClass("disabled");var u=void 0,p=120,d=function(){p>0?c.text("激活邮件已发送("+p--+"s)"):(c.text("重新发送激活邮件"),clearInterval(u),c.removeClass("disabled"))};return n||(u=setInterval(d,1e3)),{destory:function(){c.text("重新发送激活邮件"),clearInterval(u),c.removeClass("disabled")}}},r=e.closest(".activate__step");r.next(".activate__step").removeClass("hide"),r.remove();var a=i(o.mail,!0);0!=t('input[name="mail"]').data("mail").length&&t.post("/api/user/activate/mail",o,function(t){t.status&&a.destory()}),t(".activate__step-reactivate-btn").on("click",function(){a=i(o.mail),t.post("/api/user/activate/mail",o,function(t){t.status&&a.destory()})}),t(".activate-form").on("click",".btn-primary",function(){var e=t(".activate-form .change-mail").val();e.length>0&&(a.destory(),a=i(e),t.post("/api/user/activate/mail",{mail:e},function(e){e.status?a.destory():(t(".activate-showmail").show(),t(".activate-form").hide())}))})}else delete o.mail,delete o.activate_type,t.post("/api/user/activate/phone",o,function(t){t.status||location.reload()})})}();var b=window.location.href,w=/openInApp=1/.test(b);!function(){if(r.userId&&/micromessenger/.test(navigator.userAgent.toLowerCase()));else if(o("any")&&!w){var e=' ';t("body").append(e)}}(),g(document.body.clientWidth);try{localStorage.getItem("alert-tos")||t(".alert--tos").removeClass("hide")}catch(t){}if(t(".read-tos").on("click",function(){try{localStorage.setItem("alert-tos",1)}catch(t){}t(this).hasClass("close")||(location.href=t(this).data("url"))}),r.userId)if(ddosMode){var x="/api/user/stat";t.get(x,function(e){var n=e.data,o=n.events,i=n.messages,a=(n.newestLive,localStorage.getItem("lastLive"),i),s=o;a>0?(r.titleRender.set("message",a),a>99&&(a="..."),t("#letterCount").siblings(".has-unread__count").remove(),t("#letterCount").after(''+a+""),t("#letterCount-response").find(".redpoint-response").remove(),t("#letterCount-response").append(''+a+"")):(r.titleRender.clear("message"),t(".letter .has-unread__count").remove(),t(".letter-response .redpoint-response").remove()),s>0?(r.titleRender.set("event",s),s>99&&(s="..."),t("#messageCount").siblings(".has-unread__count").remove(),t("#messageCount").after(''+s+""),t("#messageCount-response").find(".redpoint-response").remove(),t("#messageCount-response").append(''+s+"")):(r.titleRender.clear("event"),t(".message .has-unread__count").remove(),t(".message-response .redpoint-response").remove()),s>0||a>0?t(".user-avatar").after(''):t(".user .has-unread__count").remove()})}else{var D=function(e){S=!0;var n=i("segmentfault.com:"+e,{autoConnect:!1,reconnection:!0,reconnectionDelayMax:5e3,reconnectionAttempts:3});return n.emit("login",t.cookie("PHPSESSID")),n.on("event",function(e){var n=e.message,o=e.event;n>0?(r.titleRender.set("message",n),n>99&&(n="..."),t("#letterCount").siblings(".has-unread__count").remove(),t("#letterCount").after(''+n+""),t("#letterCount-response").find(".redpoint-response").remove(),t("#letterCount-response").append(''+n+"")):(r.titleRender.clear("message"),t(".letter .has-unread__count").remove(),t(".letter-response .redpoint-response").remove()),o>0?(r.titleRender.set("event",o),o>99&&(o="..."),t("#messageCount").siblings(".has-unread__count").remove(),t("#messageCount").after(''+o+""),t("#messageCount-response").find(".redpoint-response").remove(),t("#messageCount-response").append(''+o+"")):(r.titleRender.clear("event"),t(".message .has-unread__count").remove(),t(".message-response .redpoint-response").remove()),o>0||n>0?t(".user-avatar").after(''):t(".user .has-unread__count").remove()}),n.open(),n},C=9443,S=!1,$=null;if(window.socket=D(C),"undefined"!=typeof document.hasFocus){var E=document.hasFocus();setInterval(function(){var t=document.hasFocus();if(E!=t)if(E=t,t)$&&(clearTimeout($),$=null),!S&&window.socket&&(S=!0,window.socket.connect());else{if($)return;$=setTimeout(function(){S&&(S=!1,window.socket.close())},3e4)}},3e3)}}return t(".topframe").text().indexOf(!0)&&t(".send-mail").click(),t("#loginBanner").on("click",".fa-times-circle",function(e){e.preventDefault(),t("#loginBanner").hide()}),t("#loginBanner").on("click",".login_now",function(t){t.preventDefault(),r.login()}),t(".bindphone").on("click",function(t){t.preventDefault(),r.bindphone()}),jQuery(function(t){t(document).ready(function(){setTimeout(function(){t(".ad-should-be-fixed").stickUp()},2e3)})}),function(){t("#notices").length&&t.get("/api/notice/newest",function(t){0!==t.data.length&&(document.querySelector("#notices").classList.remove("hidden"),document.querySelector("#notices .report").setAttribute("href",t.data[0].url),document.querySelector("#notices .report").innerHTML=t.data[0].title)})}(),function(){var n=t("#isRemoteLogin").length>0;if(n){var o=t("#isRemoteLogin").data("phone").toString()||"",i=t("#isRemoteLogin").data("mail").toString()||"",r=o.slice(0,3)+"****"+o.slice(-4),a=i.slice(0,2)+"****"+i.slice(i.indexOf("@"),i.length);e({modalSize:"modal-md",title:"异地登录验证",backdrop:"static",content:'\n\n\n ',hideClose:!0,hideDone:!0,show:function(){var e=function(){var n=t("#remoteLoginActivate .captcha");return n.attr("src",n.data("src")),(e=function(){return null})()};t("body").on("click","#remoteLoginActivate input[name=activate_type]",function(){var n=t(this),o=n.val();t('#remoteLoginActivate .form-group[data-type="'+o+'"]').removeClass("hidden"),"phone"===o?(t("#remoteLoginActivate .form-group[data-type=mail]").addClass("hidden"),e()):"mail"===o&&t("#remoteLoginActivate .form-group[data-type=phone]").addClass("hidden")}),o||(t('input[value="mail"]').trigger("click"),t('input[name="activate_type"]').prop("disabled","disabled")),i||t('input[name="activate_type"]').prop("disabled","disabled"),t("body").on("click","#remoteLoginActivate .get-code-btn",function(e){if(t("#remoteLoginActivate .captch-block").hasClass("hidden")){t("#remoteLoginActivate .captch-block").removeClass("hidden");var n=t("#remoteLoginActivate .captcha");n.attr("src",n.data("src"))}else{var i=void 0,r=t(this),a=(t(".activate__step-phone-value"),60),s=function(){a<1?(r.text("获取验证码"),r.prop("disabled",!1),clearInterval(i)):r.text(--a+"s")};r.prop("disabled",!0);var l="/api/user/phone/remote-login/send",c=t('#remoteLoginActivate input[name="cap"]').val();t.post(l,{phone:o,cap:c},function(t){0==t.status?i=setInterval(s,1e3):r.prop("disabled",!1)})}}),t("body").on("click","#remoteLoginActivate .captcha",function(e){var n=t(e.target);n.attr("src",n.data("src"))}),t("body").on("click","#remoteLoginActivate .submit",function(e){var n=t("#remoteLoginActivate .form-group[data-type=mail]").hasClass("hidden")?"phone":"mail";if("phone"==n){var r="/api/user/phone/remote-login/active",a=t('#remoteLoginActivate input[name="code"]').val();t.post(r,{phone:o,code:a},function(t){0==t.status&&location.reload()})}else{var s="/api/user/mail/remote-login/send";t.post(s,{mail:i},function(e){if(0==e.status){t(".activate--mail").removeClass("hidden"),t(".activate--init").addClass("hidden");var n=function(e,n){var o="",i={"mail.google.com":["gmail.com"],"mail.qq.com":["qq.com","vip.qq.com","foxmail.com"],"mail.163.com":["163.com"],"mail.126.com":["126.com"],"mail.sina.com":["sina.com","vip.sina.com","sina.cn"],"mail.sohu.com":["sohu.com"],"mail.139.com":["139.com"],"mail.wo.com.cn":["wo.com.cn"],"mail.189.cn":["189.cn"],"mail.21cn.com":["21.cn"],"mail.aliyun.com":["aliyun.com"],"mail.yahoo.com":["yahoo.com"]};for(var r in i){var a=i[r],s=a.find(function(t){return t===e.split("@")[1]});s&&(o=r)}o.length>0?t("#remoteLoginActivate .activate_step-mail-goto").attr("href","http://"+o):t("#remoteLoginActivate .activate_step-mail-goto").hide();var l="mailto:pr@segmentfault.com?subject=邮箱 "+e+" 无法进行异地登录验证&body=请描述具体内容";t(".activate__step-contact").attr("href",l);var c=t(".activate__step-reactivate-btn");n||c.addClass("disabled");var u=void 0,p=120,d=function(){p>0?c.text("激活邮件已发送("+p--+"s)"):(c.text("重新发送激活邮件"),clearInterval(u),c.removeClass("disabled"))};return n||(u=setInterval(d,1e3)),{destory:function(){c.text("重新发送激活邮件"),clearInterval(u),c.removeClass("disabled")}}},o=n(i,!0);t(".activate__step-reactivate-btn").on("click",function(){o=n(i),t.post("/api/user/mail/remote-login/send",{mail:i},function(e){if(e.status){o.destory();var n=e.data[1],i="";t.each(n,function(t,e){i=e,i&&alert(i)})}})})}})}})}})}}(),r}),!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define("pingpp",[],t);else{var e;e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,e.pingpp=t()}}(function(){return function t(e,n,o){function i(a,s){if(!n[a]){if(!e[a]){var l="function"==typeof require&&require;if(!s&&l)return l(a,!0);if(r)return r(a,!0);var c=new Error("Cannot find module '"+a+"'");throw c.code="MODULE_NOT_FOUND",c}var u=n[a]={exports:{}};e[a][0].call(u.exports,function(t){var n=e[a][1][t];return i(n?n:t)},u,u.exports,t,e,n,o)}return n[a].exports}for(var r="function"==typeof require&&require,a=0;a\n \n\n\n \n\n=200&&e<400&&"success"==t)o.innerCallback("success");else{var n="http_code:"+e+";response:"+t;o.innerCallback("fail",o.error("testmode_notify_fail",n))}},function(){o.innerCallback("fail",o.error("network_err"))})}}}},{"../callbacks":1,"../mods":21,"../stash":23,"../utils":25}],15:[function(t,e,n){var o=t("../utils"),i=t("../callbacks"),r={}.hasOwnProperty;e.exports={handleCharge:function(t){var e=t.credential[t.channel];"string"==typeof e?o.redirectTo(e):"object"==typeof e&&r.call(e,"url")?o.redirectTo(e.url):i.innerCallback("fail",i.error("invalid_credential","credential 格式不正确"))}}},{"../callbacks":1,"../utils":25}],16:[function(t,e,n){var o=t("../utils"),i=t("../callbacks"),r={}.hasOwnProperty;e.exports={YEEPAY_WAP_URL:"https://ok.yeepay.com/paymobile/api/pay/request",YEEPAY_WAP_TEST_URL:"http://mobiletest.yeepay.com/paymobile/api/pay/request",handleCharge:function(t){for(var e=t.channel,n=t.credential[e],a=["merchantaccount","encryptkey","data"],s=0;s >16)+(e>>16)+(n>>16);return o<<16|65535&n}function n(t,e){return t< >>32-e}function o(e,o,i,r,a,s){return t(n(t(t(o,e),t(r,s)),a),i)}function i(t,e,n,i,r,a,s){return o(e&n|~e&i,t,e,r,a,s)}function r(t,e,n,i,r,a,s){return o(e&i|n&~i,t,e,r,a,s)}function a(t,e,n,i,r,a,s){return o(e^n^i,t,e,r,a,s)}function s(t,e,n,i,r,a,s){return o(n^(e|~i),t,e,r,a,s)}function l(e,n){e[n>>5]|=128< >>9<<4)+14]=n;var o,l,c,u,p,d=1732584193,h=-271733879,f=-1732584194,m=271733878;for(o=0;o >5]>>>e%32&255);return n}function u(t){var e,n=[];for(n[(t.length>>2)-1]=void 0,e=0;e >5]|=(255&t.charCodeAt(e/8))< 16&&(i=l(i,8*t.length)),n=0;n<16;n+=1)r[n]=909522486^i[n],a[n]=1549556828^i[n];return o=l(r.concat(u(e)),512+8*e.length),c(l(a.concat(o),640))}function h(t){var e,n,o="0123456789abcdef",i="";for(n=0;n >>4&15)+o.charAt(15&e);return i}function f(t){return unescape(encodeURIComponent(t))}function m(t){return p(f(t))}function g(t){return h(m(t))}function v(t,e){return d(f(t),f(e))}function y(t,e){return h(v(t,e))}function b(t,e,n){return e?n?v(e,t):y(e,t):n?m(t):g(t)}e.exports=b}()},{}],20:[function(t,e,n){var o=t("./version").v,i=t("./testmode"),r=t("./callbacks"),a=t("./mods"),s=t("./stash"),l=t("./collection"),c=t("./payment_elements"),u={}.hasOwnProperty,p=function(){t("./init").init()};p.prototype={version:o,createPayment:function(t,e,n,o){if("function"==typeof e&&(r.userCallback=e),c.init(t),!u.call(c,"id"))return void r.innerCallback("fail",r.error("invalid_charge","no_charge_id"));if(!u.call(c,"channel"))return void r.innerCallback("fail",r.error("invalid_charge","no_channel"));u.call(c,"app")&&("string"==typeof c.app?s.app_id=c.app:"object"==typeof c.app&&"string"==typeof c.app.id&&(s.app_id=c.app.id)),l.report({type:"pure_sdk_click",channel:c.channel,ch_id:c.id});var p=c.channel;if(!u.call(c,"credential"))return void r.innerCallback("fail",r.error("invalid_charge","no_credential"));if(!c.credential)return void r.innerCallback("fail",r.error("invalid_credential","credential_is_undefined"));if(!u.call(c.credential,p))return void r.innerCallback("fail",r.error("invalid_credential","credential_is_incorrect"));if(!u.call(c,"livemode"))return void r.innerCallback("fail",r.error("invalid_charge","no_livemode_field"));var d=a.getChannelModule(p);return"undefined"==typeof d?(console.error('channel module "'+p+'" is undefined'),void r.innerCallback("fail",r.error("invalid_channel",'channel module "'+p+'" is undefined'))):c.livemode===!1?void(u.call(d,"runTestMode")?d.runTestMode(c):i.runTestMode(c)):("undefined"!=typeof n&&(s.signature=n),"boolean"==typeof o&&(s.debug=o),void d.handleCharge(c))},setAPURL:function(t){s.APURL=t}},e.exports=new p},{"./callbacks":1,"./collection":17,"./init":18,"./mods":21,"./payment_elements":22,"./stash":23,"./testmode":24,"./version":26}],21:[function(t,e,n){var o={}.hasOwnProperty,i={};e.exports=i,i.channels={alipay_pc_direct:t("./channels/alipay_pc_direct"),alipay_wap:t("./channels/alipay_wap"),bfb_wap:t("./channels/bfb_wap"),cp_b2b:t("./channels/cp_b2b"),fqlpay_qr:t("./channels/fqlpay_qr"),fqlpay_wap:t("./channels/fqlpay_wap"),jdpay_wap:t("./channels/jdpay_wap"),qpay_pub:t("./channels/qpay_pub"),upacp_pc:t("./channels/upacp_pc"),upacp_wap:t("./channels/upacp_wap"),wx_lite:t("./channels/wx_lite"),wx_pub:t("./channels/wx_pub"),wx_wap:t("./channels/wx_wap"),yeepay_wap:t("./channels/yeepay_wap")},i.extras={},i.getChannelModule=function(t){if(o.call(i.channels,t))return i.channels[t]},i.getExtraModule=function(t){if(o.call(i.extras,t))return i.extras[t]}},{"./channels/alipay_pc_direct":2,"./channels/alipay_wap":3,"./channels/bfb_wap":4,"./channels/cp_b2b":6,"./channels/fqlpay_qr":7,"./channels/fqlpay_wap":8,"./channels/jdpay_wap":9,"./channels/qpay_pub":10,"./channels/upacp_pc":11,"./channels/upacp_wap":12,"./channels/wx_lite":13,"./channels/wx_pub":14,"./channels/wx_wap":15,"./channels/yeepay_wap":16}],22:[function(t,e,n){var o=t("./callbacks"),i={}.hasOwnProperty;e.exports={id:null,or_id:null,channel:null,app:null,credential:{},extra:null,livemode:null,order_no:null,time_expire:null,init:function(t){var e;if("string"==typeof t)try{e=JSON.parse(t)}catch(t){return void o.innerCallback("fail",o.error("json_decode_fail",t))}else e=t;if("undefined"==typeof e)return void o.innerCallback("fail",o.error("json_decode_fail"));if(i.call(e,"object")&&"order"==e.object){e.or_id=e.id,e.id=e.charge,e.order_no=e.merchant_order_no;var n=e.charge_essentials;e.channel=n.channel,e.credential=n.credential,e.extra=n.extra}for(var r in this)i.call(e,r)&&(this[r]=e[r]);return this},clear:function(){for(var t in this)"function"!=typeof this[t]&&(this[t]=null)}}},{"./callbacks":1}],23:[function(t,e,n){e.exports={}},{}],24:[function(t,e,n){var o=t("./utils"),i={}.hasOwnProperty;e.exports={PINGPP_MOCK_URL:"http://sissi.pingxx.com/mock.php",runTestMode:function(t){var e={ch_id:t.id,scheme:"http",channel:t.channel};i.call(t,"or_id")&&null!==t.or_id&&(e.or_id=t.or_id),i.call(t,"order_no")?e.order_no=t.order_no:i.call(t,"orderNo")&&(e.order_no=t.orderNo),i.call(t,"time_expire")?e.time_expire=t.time_expire:i.call(t,"timeExpire")&&(e.time_expire=t.timeExpire),i.call(t,"extra")&&(e.extra=encodeURIComponent(JSON.stringify(t.extra))),o.redirectTo(this.PINGPP_MOCK_URL+"?"+o.stringifyData(e))}}},{"./utils":25}],25:[function(t,e,n){var o={}.hasOwnProperty,i=e.exports={stringifyData:function(t,e,n){"undefined"==typeof n&&(n=!1);var i=[];for(var r in t)o.call(t,r)&&"function"!=typeof t[r]&&("bfb_wap"==e&&"url"==r||"yeepay_wap"==e&&"mode"==r||"channel_url"!=r&&i.push(r+"="+(n?encodeURIComponent(t[r]):t[r])));return i.join("&")},request:function(t,e,n,r,a,s){if("undefined"==typeof XMLHttpRequest)return void console.log("Function XMLHttpRequest is undefined.");var l=new XMLHttpRequest;if("undefined"!=typeof l.timeout&&(l.timeout=6e3),e=e.toUpperCase(),"GET"===e&&"object"==typeof n&&n&&(t+="?"+i.stringifyData(n,"",!0)),l.open(e,t,!0),"undefined"!=typeof s)for(var c in s)o.call(s,c)&&l.setRequestHeader(c,s[c]);"POST"===e?(l.setRequestHeader("Content-type","application/json; charset=utf-8"),l.send(JSON.stringify(n))):l.send(),"undefined"==typeof r&&(r=function(){}),"undefined"==typeof a&&(a=function(){}),l.onreadystatechange=function(){4==l.readyState&&r(l.responseText,l.status,l)},l.onerror=function(t){a(l,0,t)}},formSubmit:function(t,e,n){if("undefined"==typeof window)return void console.log("Not a browser, form submit url: "+t);var i=document.createElement("form");i.setAttribute("method",e),i.setAttribute("action",t);for(var r in n)if(o.call(n,r)){var a=document.createElement("input");a.setAttribute("type","hidden"),a.setAttribute("name",r),a.setAttribute("value",n[r]),i.appendChild(a)}document.body.appendChild(i),i.submit()},randomString:function(t){"undefined"==typeof t&&(t=32);for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",n=e.length,o="",i=0;i ',i=["fontFamily","fontSize","fontWeight","fontStyle","letterSpacing","textTransform","wordSpacing","textIndent","whiteSpace"],r=t(o).data("autosize",!0)[0];r.style.lineHeight="99px","99px"===t(r).css("lineHeight")&&i.push("lineHeight"),r.style.lineHeight="",t.fn.autosize=function(o){return this.length?(o=t.extend({},n,o||{}),r.parentNode!==document.body&&t(document.body).append(r),this.each(function(){function n(){var e,n=!!window.getComputedStyle&&window.getComputedStyle(d,null);n?(e=d.getBoundingClientRect().width,0!==e&&"number"==typeof e||(e=parseInt(n.width,10)),t.each(["paddingLeft","paddingRight","borderLeftWidth","borderRightWidth"],function(t,o){e-=parseInt(n[o],10)})):e=h.width(),r.style.width=Math.max(e,0)+"px"}function a(){var a={};if(e=d,r.className=o.className,r.id=o.id,c=parseInt(h.css("maxHeight"),10),t.each(i,function(t,e){a[e]=h.css(e)}),t(r).css(a).attr("wrap",h.attr("wrap")),n(),window.chrome){var s=d.style.width;d.style.width="0px";d.offsetWidth;d.style.width=s}}function s(){var t,i;e!==d?a():n(),!d.value&&o.placeholder?r.value=(h.attr("placeholder")||"")+o.append:r.value=d.value+o.append,r.style.overflowY=d.style.overflowY,i=parseInt(d.style.height,10),r.scrollTop=0,r.scrollTop=9e4,t=r.scrollTop,c&&t>c?(d.style.overflowY="scroll",t=c):(d.style.overflowY="hidden",t")),this.model=new s(this),this.view=new l(this)}return n.prototype.uid=function(){return(Math.random().toString(16)+"000000000").substr(2,8)+(new Date).getTime()},n.prototype.init=function(e){return this.setting=t.extend({},this.setting||t.fn.atwho.default,e),this.view.init(),this.model.reload(this.setting.data)},n.prototype.destroy=function(){return this.trigger("beforeDestroy"),this.model.destroy(),this.view.destroy(),this.$el.remove()},n.prototype.call_default=function(){var e,n,o;o=arguments[0],e=2<=arguments.length?c.call(arguments,1):[];try{return r[o].apply(this,e)}catch(e){return n=e,t.error(""+n+" Or maybe At.js doesn't have function "+o)}},n.prototype.trigger=function(t,e){var n,o;return null==e&&(e=[]),e.push(this),n=this.get_opt("alias"),o=n?""+t+"-"+n+".atwho":""+t+".atwho",this.$inputor.trigger(o,e)},n.prototype.callbacks=function(t){return this.get_opt("callbacks")[t]||r[t]},n.prototype.get_opt=function(t,e){var n;try{return this.setting[t]}catch(t){return n=t,null}},n.prototype.content=function(){return this.$inputor.is("textarea, input")?this.$inputor.val():this.$inputor.text()},n.prototype.catch_query=function(){var t,e,n,o,i,r;return e=this.content(),t=this.$inputor.caret("pos",{iframe:this.app.iframe}),r=e.slice(0,t),o=this.callbacks("matcher").call(this,this.at,r,this.get_opt("start_with_space")),"string"==typeof o&&o.length<=this.get_opt("max_len",20)?(i=t-o.length,n=i+o.length,this.pos=i,o={text:o,head_pos:i,end_pos:n},this.trigger("matched",[this.at,o.text])):(o=null,this.view.hide()),this.query=o},n.prototype.rect=function(){var t,e;if(t=this.$inputor.caret("offset",this.pos-1,{iframe:this.app.iframe}))return"true"===this.$inputor.attr("contentEditable")&&(t=this.cur_rect||(this.cur_rect=t)||t),e=this.app.document.selection?0:2,{left:t.left,top:t.top,bottom:t.top+t.height+e}},n.prototype.reset_rect=function(){if("true"===this.$inputor.attr("contentEditable"))return this.cur_rect=null},n.prototype.mark_range=function(){if("true"===this.$inputor.attr("contentEditable")&&(this.app.window.getSelection&&(this.range=this.app.window.getSelection().getRangeAt(0)),this.app.document.selection))return this.ie8_range=this.app.document.selection.createRange()},n.prototype.insert_content_for=function(e){var n,o,i;return o=e.data("value"),i=this.get_opt("insert_tpl"),this.$inputor.is("textarea, input")||!i?o:(n=t.extend({},e.data("item-data"),{"atwho-data-value":o,"atwho-at":this.at}),this.callbacks("tpl_eval").call(this,i,n))},n.prototype.insert=function(e,n){var o,i,r,a,s,l,c,u,p;return o=this.$inputor,p=this.callbacks("inserting_wrapper").call(this,o,e,this.get_opt("suffix")),o.is("textarea, input")?(l=o.val(),c=l.slice(0,Math.max(this.query.head_pos-this.at.length,0)),u=""+c+p+l.slice(this.query.end_pos||0),o.val(u),o.caret("pos",c.length+p.length,{iframe:this.app.iframe})):(a=this.range)?(r=a.startOffset-(this.query.end_pos-this.query.head_pos)-this.at.length,a.setStart(a.endContainer,Math.max(r,0)),a.setEnd(a.endContainer,a.endOffset),a.deleteContents(),i=t(p,this.app.document)[0],a.insertNode(i),a.setEndAfter(i),a.collapse(!1),s=this.app.window.getSelection(),s.removeAllRanges(),s.addRange(a)):(a=this.ie8_range)&&(a.moveStart("character",this.query.end_pos-this.query.head_pos-this.at.length),a.pasteHTML(p),a.collapse(!1),a.select()),o.is(":focus")||o.focus(),o.change()},n.prototype.render_view=function(t){var e;return e=this.get_opt("search_key"),t=this.callbacks("sorter").call(this,this.query.text,t.slice(0,1001),e),this.view.render(t.slice(0,this.get_opt("limit")))},n.prototype.look_up=function(){var e,n;if(e=this.catch_query())return n=function(t){return t&&t.length>0?this.render_view(t):this.view.hide()},this.model.query(e.text,t.proxy(n,this)),e},n}(),s=function(){function e(t){this.context=t,this.at=this.context.at,this.storage=this.context.$inputor}return e.prototype.destroy=function(){return this.storage.data(this.at,null)},e.prototype.saved=function(){return this.fetch()>0},e.prototype.query=function(t,e){var n,o,i;return n=this.fetch(),o=this.context.get_opt("search_key"),n=this.context.callbacks("filter").call(this.context,t,n,o)||[],i=this.context.callbacks("remote_filter"),n.length>0||!i&&0===n.length?e(n):i.call(this.context,t,e)},e.prototype.fetch=function(){return this.storage.data(this.at)||[]},e.prototype.save=function(t){return this.storage.data(this.at,this.context.callbacks("before_save").call(this.context,t||[]))},e.prototype.load=function(t){if(!this.saved()&&t)return this._load(t)},e.prototype.reload=function(t){return this._load(t)},e.prototype._load=function(e){return"string"==typeof e?t.ajax(e,{dataType:"json"}).done(function(t){return function(e){return t.save(e)}}(this)):this.save(e)},e}(),l=function(){function e(e){this.context=e,this.$el=t(""),this.timeout_id=null,this.context.$el.append(this.$el),this.bind_event()}return e.prototype.init=function(){var t;return t=this.context.get_opt("alias")||this.context.at.charCodeAt(0),this.$el.attr({id:"at-view-"+t})},e.prototype.destroy=function(){return this.$el.remove()},e.prototype.bind_event=function(){var e;return e=this.$el.find("ul"),e.on("mouseenter.atwho-view","li",function(n){return e.find(".cur").removeClass("cur"),t(n.currentTarget).addClass("cur")}).on("click",function(t){return function(e){return t.choose(e),e.preventDefault()}}(this))},e.prototype.visible=function(){return this.$el.is(":visible")},e.prototype.choose=function(t){var e,n;if((e=this.$el.find(".cur")).length&&(n=this.context.insert_content_for(e),this.context.insert(this.context.callbacks("before_insert").call(this.context,n,e),e),this.context.trigger("inserted",[e,t]),this.hide(t)),this.context.get_opt("hide_without_suffix"))return this.stop_showing=!0},e.prototype.reposition=function(e){var n,o;return e.bottom+this.$el.height()-t(window).scrollTop()>t(window).height()&&(e.bottom=e.top-this.$el.height()),n={left:e.left,top:e.bottom},null!=(o=this.context.callbacks("before_reposition"))&&o.call(this.context,n),this.$el.offset(n),this.context.trigger("reposition",[n])},e.prototype.next=function(){var t,e;return t=this.$el.find(".cur").removeClass("cur"),e=t.next(),e.length||(e=this.$el.find("li:first")),e.addClass("cur")},e.prototype.prev=function(){var t,e;return t=this.$el.find(".cur").removeClass("cur"),e=t.prev(),e.length||(e=this.$el.find("li:last")),e.addClass("cur")},e.prototype.show=function(){var t;return this.stop_showing?void(this.stop_showing=!1):(this.context.mark_range(),this.visible()||(this.$el.show(),this.context.trigger("shown")),(t=this.context.rect())?this.reposition(t):void 0)},e.prototype.hide=function(t,e){var n;if(this.visible())return isNaN(e)?(this.context.reset_rect(),this.$el.hide(),this.context.trigger("hidden",[t])):(n=function(t){return function(){return t.hide()}}(this),clearTimeout(this.timeout_id),this.timeout_id=setTimeout(n,e))},e.prototype.render=function(e){var n,o,i,r,a,s,l;if(!(t.isArray(e)&&e.length>0))return void this.hide();for(this.$el.find("ul").empty(),o=this.$el.find("ul"),a=this.context.get_opt("tpl"),s=0,l=e.length;s-1&&a.push(o);return a.sort(function(t,e){return t.atwho_order-e.atwho_order})},tpl_eval:function(t,e){var n;try{return t.replace(/\$\{([^\}]*)\}/g,function(t,n,o){return e[n]})}catch(t){return n=t,""}},highlighter:function(t,e){var n;return e?(n=new RegExp(">\\s*(\\w*?)("+e.replace("+","\\+")+")(\\w*)\\s*<","ig"),t.replace(n,function(t,e,n,o){return"> "+e+""+n+""+o+" <"})):t},before_insert:function(t,e){return t},inserting_wrapper:function(t,e,n){var o,i;return o=""===n?n:n||" ",t.is("textarea, input")?""+e+o:"true"===t.attr("contentEditable")?(o=""===n?n:n||" ",/firefox/i.test(navigator.userAgent)?i=""+e+o+"":(n=""+o+"",i=""+e+n+""),this.app.document.selection&&(i=""+e+""),i):void 0}},n={load:function(t,e){var n;if(n=this.controller(t))return n.model.load(e)},setIframe:function(t){return this.setIframe(t),null},run:function(){return this.dispatch()},destroy:function(){return this.shutdown(),this.$inputor.data("atwho",null)}},e=t(""),t.fn.atwho=function(i){var r,a;return a=arguments,t("body").append(e),r=null,this.filter("textarea, input, [contenteditable=true]").each(function(){var e,s;return(s=(e=t(this)).data("atwho"))||e.data("atwho",s=new o(this)),"object"!=typeof i&&i?n[i]&&s?r=n[i].apply(s,Array.prototype.slice.call(a,1)):t.error("Method "+i+" does not exist on jQuery.caret"):s.reg(i.at,i)}),r||this},t.fn.atwho.default={at:void 0,alias:void 0,data:null,tpl:" ${name} ",insert_tpl:"${atwho-data-value}",callbacks:r,search_key:"name",suffix:void 0,hide_without_suffix:!1,start_with_space:!0,highlight_first:!0,limit:5,max_len:20,display_timeout:300,delay:null}})}.call(this),function(){!function(t){return"function"==typeof define&&define.amd?define("caret",["jquery"],t):t(window.jQuery)}(function(t){"use strict";var e,n,o,i,r,a,s,l,c,u,p;return u="caret",e=function(){function e(t){this.$inputor=t,this.domInputor=this.$inputor[0]}return e.prototype.setPos=function(){return this.domInputor},e.prototype.getIEPosition=function(){return t.noop()},e.prototype.getPosition=function(){return t.noop()},e.prototype.getOldIEPos=function(){var t,e;return e=s.selection.createRange(),t=s.body.createTextRange(),t.moveToElementText(this.domInputor),t.setEndPoint("EndToEnd",e),t.text.length},e.prototype.getPos=function(){var t,e,n;return(n=this.range())?(t=n.cloneRange(),t.selectNodeContents(this.domInputor),t.setEnd(n.endContainer,n.endOffset),e=t.toString().length,t.detach(),e):s.selection?this.getOldIEPos():void 0},e.prototype.getOldIEOffset=function(){var t,e;return t=s.selection.createRange().duplicate(),t.moveStart("character",-1),e=t.getBoundingClientRect(),{height:e.bottom-e.top,left:e.left,top:e.top}},e.prototype.getOffset=function(){var e,n,o,i;if(c.getSelection&&(o=this.range())){if(o.endOffset-1<0)return null;e=o.cloneRange(),e.setStart(o.endContainer,o.endOffset-1),e.setEnd(o.endContainer,o.endOffset),i=e.getBoundingClientRect(),n={height:i.height,left:i.left+i.width,top:i.top},e.detach()}else s.selection&&(n=this.getOldIEOffset());return n&&!l&&(n.top+=t(c).scrollTop(),n.left+=t(c).scrollLeft()),n},e.prototype.range=function(){var t;if(c.getSelection)return t=c.getSelection(),t.rangeCount>0?t.getRangeAt(0):null},e}(),n=function(){function e(t){this.$inputor=t,this.domInputor=this.$inputor[0]}return e.prototype.getIEPos=function(){var t,e,n,o,i,r,a;return e=this.domInputor,r=s.selection.createRange(),i=0,r&&r.parentElement()===e&&(o=e.value.replace(/\r\n/g,"\n"),n=o.length,a=e.createTextRange(),a.moveToBookmark(r.getBookmark()),t=e.createTextRange(),t.collapse(!1),i=a.compareEndPoints("StartToEnd",t)>-1?n:-a.moveStart("character",-n)),i},e.prototype.getPos=function(){return s.selection?this.getIEPos():this.domInputor.selectionStart},e.prototype.setPos=function(t){var e,n;return e=this.domInputor,s.selection?(n=e.createTextRange(),n.move("character",t),n.select()):e.setSelectionRange&&e.setSelectionRange(t,t),e},e.prototype.getIEOffset=function(t){var e,n,o,i;return n=this.domInputor.createTextRange(),t||(t=this.getPos()),n.move("character",t),o=n.boundingLeft,i=n.boundingTop,e=n.boundingHeight,{left:o,top:i,height:e}},e.prototype.getOffset=function(e){var n,o,i;return n=this.$inputor,s.selection?(o=this.getIEOffset(e),o.top+=t(c).scrollTop()+n.scrollTop(),o.left+=t(c).scrollLeft()+n.scrollLeft(),o):(o=n.offset(),i=this.getPosition(e),o={left:o.left+i.left-n.scrollLeft(),top:o.top+i.top-n.scrollTop(),height:i.height})},e.prototype.getPosition=function(t){var e,n,i,r,a,s,l;return e=this.$inputor,r=function(t){return t.replace(//g,">").replace(/`/g,"`").replace(/"/g,""").replace(/\r\n|\r|\n/g,"
")},void 0===t&&(t=this.getPos()),l=e.val().slice(0,t),i=e.val().slice(t),a=""+r(l)+"",a+="|",a+=""+r(i)+"",s=new o(e),n=s.create(a).rect()},e.prototype.getIEPosition=function(t){var e,n,o,i,r;return o=this.getIEOffset(t),n=this.$inputor.offset(),i=o.left-n.left,r=o.top-n.top,e=o.height,{left:i,top:r,height:e}},e}(),o=function(){function e(t){this.$inputor=t}return e.prototype.css_attr=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopStyle","borderRightStyle","borderBottomStyle","borderLeftStyle","borderTopWidth","boxSizing","fontFamily","fontSize","fontWeight","height","letterSpacing","lineHeight","marginBottom","marginLeft","marginRight","marginTop","outlineWidth","overflow","overflowX","overflowY","paddingBottom","paddingLeft","paddingRight","paddingTop","textAlign","textOverflow","textTransform","whiteSpace","wordBreak","wordWrap"],e.prototype.mirrorCss=function(){var e,n=this;return e={position:"absolute",left:-9999,top:0,zIndex:-2e4},"TEXTAREA"===this.$inputor.prop("tagName")&&this.css_attr.push("width"),t.each(this.css_attr,function(t,o){return e[o]=n.$inputor.css(o)}),e},e.prototype.create=function(e){return this.$mirror=t(""),this.$mirror.css(this.mirrorCss()),this.$mirror.html(e),this.$inputor.after(this.$mirror),this},e.prototype.rect=function(){var t,e,n;return t=this.$mirror.find("#caret"),e=t.position(),n={left:e.left,top:e.top,height:t.height()},this.$mirror.remove(),n},e}(),i={contentEditable:function(t){return!(!t[0].contentEditable||"true"!==t[0].contentEditable)}},a={pos:function(t){return t||0===t?this.setPos(t):this.getPos()},position:function(t){return s.selection?this.getIEPosition(t):this.getPosition(t)},offset:function(e){var n,o;return o=this.getOffset(e),l&&(n=t(l).offset(),o.top+=n.top,o.left+=n.left),o}},s=null,c=null,l=null,p=function(t){var e;return(e=null!=t?t.iframe:void 0)?(l=e,c=e.contentWindow,s=e.contentDocument||c.document):(l=void 0,c=window,s=document)},r=function(t){var e;s=t[0].ownerDocument,c=s.defaultView||s.parentWindow;try{return l=c.frameElement}catch(t){e=t}},t.fn.caret=function(o,r,s){var l;return a[o]?(t.isPlainObject(r)?(p(r),r=void 0):p(s),l=i.contentEditable(this)?new e(this):new n(this),a[o].apply(l,[r])):t.error("Method "+o+" does not exist on jQuery.caret")},t.fn.caret.EditableCaret=e,t.fn.caret.InputCaret=n,t.fn.caret.Utils=i,t.fn.caret.apis=a})}.call(this),define("commentNews",["main","jquery_autosize","atwho","caret"],function(t){"use strict";return function(t){t||(t={}),this.page=1,this.box=$(".comments--news"),this.id=this.box.data("id"),this.mod=t.mod||"",this.publishUserText=t.publishUserText||"作者",this.replyPage={},this.sort="default",this.authorId=this.box.data("author-id"),this.userId=this.box.data("user-id"),this.isAdmin=this.box.data("is-admin"),this.form=$(".comments-box-content"),this.textarea=this.form.find("textarea"),this.commentBtn=this.form.find(".btn-primary"),this.eleStatNumber=$(".comments-stat"),this.container=$(".comments-list"),this.$loading=$(".comments-loading"),this.$more=$(".comments-more"),this.singleComment='\n \n ',this.tpl='\n \n ',this.subTpl='\n \n ';var e=this;this.unfoldCommentArea=function(t,n,o){var i=$("[data-id="+t+"]").find(".reply-more-btn"),r=i.closest(".reply-more"),a=i.closest(".reply-item--ops"),s=i.closest(".comments-item").data("id");e.replyPage[s]=e.replyPage[s]||0;var l=++e.replyPage[s],c="/api/comment/"+s+"/more?page="+l;i.addClass("disabled"),$.get(c,function(t){if(i.removeClass("disabled"),!t.status){var s=t.data,l=e.singleComment,c=_.reduce(s.row,function(t,n){return t+_.template(l)({comment:n,authorId:e.authorId})},"");a.before(c),s.hasMore||r.remove(),n(o)}})},this.render=function(t,n,o){if(n=n||!1,o=o||"html",n){parseInt(e.authorId)!=parseInt(t.user.id)?t.publishUserText="":t.publishUserText=e.publishUserText;var i=_.template(e.tpl)(t);"news"===e.mod?e.container.prepend(i):e.container.append(i)}else{_.each(t,function(t){parseInt(e.authorId)!=parseInt(t.user.id)?t.publishUserText="":t.publishUserText=e.publishUserText,t.repliedComments&&_.each(t.repliedComments,function(t){parseInt(e.authorId)!=parseInt(t.user.id)?t.publishUserText="":t.publishUserText=e.publishUserText})});var r=_.reduce(t,function(t,n){return t+_.template(e.tpl)(n)},"");e.container[o](r)}$("textarea").autosize()},this.fetch=function(t){t=t||void 0,e.$loading.removeClass("hide"),"more"===t&&(e.page=e.page+1),"grapevineDetail"==e.mod&&(e.mod="grapevine"),$.get("/api/"+e.mod+"/"+e.id+"/comments?sort="+e.sort+"&page="+e.page,function(n){if(e.$loading.addClass("hide"),!n.status&&n.data.total>0){var o=n.data.rows,i=n.data.total;e.eleStatNumber.text(i+" 条评论"),"more"===t?e.render(o,void 0,"append"):e.render(o),n.data.hasMore&&e.$more.removeClass("hide")}})},this.init=function(){window.commentDeleteClass=function(t){return t?"":"hide"},e.textarea.atwho({at:"@",callbacks:{remote_filter:function(t,n){var o=void 0;if(o=e.box.data("id")+"",t){if(t)return $.getJSON("/api/users/search",{q:t},function(t){t.status||n(t.data)})}else if(o.match(/^11|^12|^13/))return $.getJSON("/api/users/search",{objectId:o},function(t){t.status||n(t.data)})},tpl_eval:function(t,e){return''+(e.avatarUrl?' "}}}),"news"===e.mod||"article"===e.mod||"grapevineDetail"===e.mod?e.box.on("click",".btn-group-menu a",function(){var t=$(this).data("sort"),n=$(this).text();e.sort!=t&&(e.sort=t,e.page=1,e.replyPage={},e.box.find(".comments-sort-text").text(n),e.fetch()),$(this).addClass("active"),$(this).siblings().removeClass("active")}):e.box.on("click",".dropdown-menu a",function(){var t=$(this).data("sort"),n=$(this).text();e.sort!=t&&(e.sort=t,e.page=1,e.replyPage={},e.box.find(".comments-sort-text").text(n),e.fetch())}),e.$more.on("click","a",function(){e.$more.addClass("hide"),e.$loading.removeClass("hide"),e.fetch("more")}),e.id>0&&(e.commentBtn.on("click",function(t){t.preventDefault();var n=e.textarea.val();e.commentBtn.prop("disabled",!0),"grapevineDetail"==e.mod&&(e.mod="grapevine"),$.post("/api/"+e.mod+"/"+e.id+"/comments/add",{text:n},function(t){if(e.commentBtn.prop("disabled",!1),!t.status){t.data.comment.repliedComments=null,t.data.comment.repliedCommentCount=0;var n=t.data.total,o=t.data.comment;e.eleStatNumber.text(n+" 条评论"),e.render(o,"single"),e.textarea.val("")}})}),e.container.on("click",".reply-btn",function(t){t.preventDefault();var n=$(this),o=$(this).closest(".comments-item"),i=n.closest(".reply-list"),r=o.find("textarea"),a=o.find(".reply-item--ops"),s=o.data("id"),l=o.find(".reply-text").val(),c="/api/comment/"+s+"/reply";n.prop("disabled",!0),$.post(c,{text:l},function(t){if(n.prop("disabled",!1),!t.status){i.find(".reply-more").remove();var o=t.data;o.authorId=e.authorId;var s=t.data.total;e.eleStatNumber.text(s+" 条评论");var l=e.singleComment,c=_.template(l)(o);a.before(c),r.last().val("")}})}),e.showCommentTextarea=function(t){var n=t.closest(".comments-content").find(".reply-list");$(".reply-list--empty").hide(),n.hasClass("reply-list--empty")&&n.show(),$(".reply-form").remove(),$(".reply-inner-btn").removeClass("hide"),$(".reply-item--ops").removeClass("hide");var o={};o.id=t.closest(".comments-item").data("id");var i=_.template(e.subTpl)(o);n.append(i),n.find(".reply-inner-btn").addClass("hide"),n.find(".reply-item--ops").addClass("hide"),n.find("textarea").focus(),$("textarea").autosize(),$(".reply-text").atwho({at:"@",callbacks:{remote_filter:function(t,n){var o=void 0;if(o=e.box.data("id")+"",t){if(t)return $.getJSON("/api/users/search",{q:t},function(t){t.status||n(t.data)})}else if(o.match(/^11|^12|^13/))return $.getJSON("/api/users/search",{objectId:o},function(t){t.status||n(t.data)})},tpl_eval:function(t,e){return'':"")+e.name+" @"+e.slug+"
'+(e.avatarUrl?' "}}})},e.container.on("click",".comments-reply-btn",function(){e.showCommentTextarea($(this))}),e.container.on("click",".comments-reply-user-btn",function(){e.showCommentTextarea($(this));var t=$(this).data("username"),n=$(this).data("userslug");$(this).closest(".reply-list").find("textarea").val("@"+t+"["+n+"] ")}),e.container.on("click",".comment-edit-btn",function(t){var e=$(this).closest(".reply-item").length>0?"reply":"comments",n=$(this).closest("."+e+"-item"),o=n.data("id"),i=n.find("."+e+"-item").height(),r=("reply"==e?n.find(".reply-content"):n.find(".comments-content .fmt")).addClass("hidden"),a=n.find(".editBtns").first().removeClass("hidden"),s=a.find(".cancel").first(),l=a.find(".edit").first(),c=n.find(".comment-edit-btn").first().addClass("hidden"),u=n.find(".editTextarea").first().css("height",i).removeClass("hidden").autosize().focus();n.find("."+e+"-content p").first().addClass("hidden"),"comments"==e?n.find(".comment-option").addClass("hidden"):n.find(".commentTools").addClass("hidden"),u.on("keydown",function(t){return(t.ctrlKey||t.metaKey)&&13===t.keyCode?($(this).siblings(".comment-func").find("button.edit").click(),!1):27===t.keyCode?($(this).siblings(".comment-func").find("button.cancel").click(),!1):9===t.keyCode?($(this).siblings(".comment-func").find("button.edit").focus(),!1):void 0}),s.click(function(){return u.addClass("hidden"),a.addClass("hidden"),r.removeClass("hidden"),c.removeClass("hidden"),n.find("."+e+"-content p").first().removeClass("hidden"),n.find(".commentTools").removeClass("hidden"),n.find(".comment-option").removeClass("hidden"),n.find(".editTextarea").removeClass("error"),n.find(".error--msg").remove(),!1}).on("keydown",function(t){if(9===t.keyCode)return $(this).parent().siblings(".commentDel").focus(),n.find(".commentTools").removeClass("hidden"),n.find(".comment-option").removeClass("hidden"),!1}),l.unbind("click").click(function(t){t.preventDefault(),$.post("/api/comment/"+o+"/edit",{text:u.val()},function(t){0===t.status&&(r.html(t.data.parsedText),n.find(".createdDate").text(t.data.createdDate),s.click(),n.find(".commentTools").removeClass("hidden"),n.find(".comment-option").removeClass("hidden"),n.find("."+e+"-content p").first().removeClass("hidden"))})}).on("keydown",function(t){if(9===t.keyCode)return $(this).siblings("button.cancel").focus(),!1})}),e.container.on("click",".comment-delete-btn",function(){var t=$(this).closest(".reply-item");t.length||(t=$(this).closest(".comments-item"));var n=t.data("id");confirm("真的要删除该评论?")&&$.post("/api/comment/"+n+"/delete",function(t){if(t.status){if("form"!==t.data[0])return sfModal({title:t.data[0],content:t.data[1]})}else e.fetch()})}),e.container.on("click",".reply-inner-btn",function(){e.showCommentTextarea($(this))}),e.container.on("click",".reply-more-btn:not(.disabled)",function(){var t=$(this),n=$(this).closest(".reply-more"),o=$(this).closest(".reply-item--ops"),i=$(this).closest(".comments-item").data("id");e.replyPage[i]=e.replyPage[i]||0;var r=++e.replyPage[i],a="/api/comment/"+i+"/more?page="+r;t.addClass("disabled"),$.get(a,function(i){if(t.removeClass("disabled"),!i.status){var r=i.data,a=e.singleComment,s=_.reduce(r.row,function(t,n){return t+_.template(a)({comment:n,authorId:e.authorId})},"");o.before(s),r.hasMore||n.remove()}})}),e.container.on("click",".comments-zan",function(t){t.preventDefault();var e=$(this),n=$(this).closest(".reply-item");0==n.length&&(n=$(this).closest(".comments-item"));var o=n.data("id"),i=e.hasClass("comments-zan--active")?"/cancel":"",r=!(0==e.parents(".not-reply").length);$.post("/api/comment/"+o+"/like"+i,function(t){if(!t.status){var n=t.data;i?(e.find(".comments-zan-text").text("赞"),e.removeClass("comments-zan--active")):(e.find(".comments-zan-text").text("已赞"),e.addClass("comments-zan--active")),r?n>0?e.find(".comments-zan-value").text("+"+n):e.find(".comments-zan-value").text(""):(e.find(".comments-zan-value").text(n),e.find(".comments-zan-value").text()>0&&(e.find(".comments-zan-value").removeClass("comment-showhide"),e.find(".fa-thumbs-up").removeClass("comment-showhide")))}})}))},this.init()}}),define("bookmark",["jquery","sfModal","main","jquery_tmpl"],function(t,e,n){"use strict";var o,i;return o='',i='',{createArchive:function(n,i,r){var a;a=this,e({title:"创建收藏夹",content:t.tmpl(o,{name:"",description:"",isPrivate:!0}),doneText:"提交",doneFn:function(){var e;e=t(".bookmarklist-form"),t.post("/api/bookmarkArchives/add",{name:e.find("[name=name]").val(),description:e.find("[name=description]").val(),isPrivate:e.find("[name=isPrivate]:checked").val()},function(t){0===t.status&&("edit"===i?a.editBookmark(n,r):"bookmark"===i?a.addBookmark(n,r,t.data.id):"other"===i?r(t):window.location.reload())})},hide:function(){"edit"===i?a.editBookmark(n,r):"bookmark"===i&&a.addBookmark(n,r)}})},editArchive:function(n){e({title:"编辑收藏夹",$content:t.tmpl(o,{name:n.data("name"),description:n.data("desc"),isPrivate:n.data("isprivate")}),doneText:"提交",doneFn:function(){var e;e=t(".bookmarklist-form"),t.post("/api/bookmarkArchive/"+n.data("id")+"/edit",{name:e.find("[name=name]").val(),description:e.find("[name=description]").val(),isPrivate:e.find("[name=isPrivate]:checked").val()},function(t){0===t.status&&window.location.reload()})}})},deleteArchive:function(n){e({title:"删除收藏夹",content:'确认要删除收藏夹「」么?':"")+e.name+" @"+e.slug+"
注意:收藏夹下的收藏也会被删除!',doneText:"删除",doneClass:"btn-danger",closeText:"取消",show:function(){t(".fuckXss").text(n.data("name"))},doneFn:function(){t.post("/api/bookmarkArchive/"+n.data("id")+"/delete",function(t){t.status||(location.href=t.data)})}})},addBookmark:function(t,e,n){this.getArchive(t,e,"bookmark",n)},editBookmark:function(t,e){this.getArchive(t,e,"edit")},successFn:null,getArchive:function(n,o,r,a){var s;s=this,s.successFn=o,t.get("/api/user/bookmarkArchives",{objectId:n.data("id")},function(l){var c;c="",0===l.status&&(e({title:"收藏",content:t.tmpl(i),doneText:"提交",show:function(){return setTimeout(function(){var e;if(e=t(".sfmodal input[type=checkbox]").length,1===e&&!l.data[0].isBookmarked)return t(".sfmodal input[type=checkbox]").trigger("click")},100)},doneFn:function(){var i,r,a;r=t(this),t(".bookmarklist").removeClass("error").siblings(".error--msg").remove(),a=[],i=t(".bookmarklist-form").length>1?t(".bookmarklist-form").eq(1):t(".bookmarklist-form"),i.find("li.active").each(function(){a.push(t(this).data("id"))}),t(".sfmodal").find(".done-btn").text("加载中").attr("disabled","disabled"),t.post("/api/"+n.data("type")+"/"+n.data("id")+"/bookmark",{archiveIds:a},function(n){var i;0===n.status?("false"===n.data&&window.location.reload(),o&&o(n,a.length),e("hide"),i=location.pathname.split("/"),"bookmark"===i[1]&&a.indexOf(i[2])===-1&&location.reload()):(t(".bookmarklist").addClass("error").after('必须选择收藏夹'),t(".sfmodal").find(".done-btn").text("提交").removeAttr("disabled"))})}}),t(".sfModal-content").html(t.tmpl(i,[{list:l.data}])),t(".bookmarklist").delegate("li","click",function(){var e;e=t(this).find("input[type=checkbox]"),t(this).toggleClass("active"),t(this).hasClass("active")?e.prop("checked",!0):e.prop("checked",!1)}),a&&t(".bookmarklist li[data-id="+a+"]").click(),t(".sfmodal .new-bookmark").click(function(){return s.createArchive(n,r,o),!1}))})},deleteBookmark:function(n){e({title:"删除收藏",content:'确认要从收藏夹「」中删除收藏「」么?',doneText:"删除",doneClass:"btn-danger",closeText:"取消",show:function(){t(".delete-archivemodal").text(n.data("archive")),t(".delete-bookmarkmodal").text(n.data("title"))},doneFn:function(){t.post("/api/"+n.data("type")+"/"+n.data("id")+"/bookmark",{archiveId:null},function(t){0===t.status&&(n.parents(".stream-list__item").fadeOut().remove(), e("hide"))})}})}}}),define("statusToggle",[],function(){"use strict";return function(t){t.data("toggle","false"),t.data("toggle")&&(t.on("active",function(e,n){t.data("toggle","true"),n.call(this)}),t.on("unactive",function(e,n){t.data("toggle","true"),n.call(this)}))}}),!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("sf_share",e):"object"==typeof exports?exports.WidgetShare=e():t.WidgetShare=e()}(this,function(){return function(t){function e(o){if(n[o])return n[o].exports;var i=n[o]={exports:{},id:o,loaded:!1};return t[o].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){t.exports=n(1)},function(t,e,n){"use strict";var o=n(4);t.exports=o},function(t,e){"use strict";function n(){}function o(t,e){var n;return this.element=document.querySelector(t),this.el={head:document.getElementsByTagName("head")[0],body:document.getElementsByTagName("body")[0]},this.config={enabled_networks:0,protocol:-1===["http","https"].indexOf(window.location.href.split(":")[0])?"https://":"//",url:$(t).parent().data("url")||location.href,text:this.data(this.element,"text"),caption:null,title:this.data(this.element,"text")?this.data(this.element,"text"):(n=document.querySelector('meta[property="og:title"]')||document.querySelector('meta[name="twitter:title"]'))?n.getAttribute("content"):(n=document.querySelector("title"))?n.innerText:void 0,image:this.data(this.element,"image")||"http://s.segmentfault.com/img/sf-114.png",pic:this.data(this.element,"pic")||"http://static.segmentfault.com/global/img/touch-icon.png",description:(n=document.querySelector('meta[property="og:description"]')||document.querySelector('meta[name="twitter:description"]')||document.querySelector('meta[name="description"]'))?n.getAttribute("content"):"",networks:{weibo:{enabled:!0,url:null,title:null,text:null,caption:null,description:null,image:null,pic:null,appkey:"1742025894"},wechart:{enabled:!0,url:null},renren:{enabled:!0,url:null,title:null,text:null,description:null,image:null,comment:null},tqq:{enabled:!0,url:null,appkey:"",title:null,text:null,image:null},douban:{enabled:!0,url:null,href:null,appkey:null,text:null,title:null,caption:null,description:null,image:null,comment:null},google_plus:{enabled:!1,url:null},twitter:{enabled:!0,url:null,text:null,description:null},facebook:{enabled:!0,load_sdk:!0,url:null,app_id:null,title:null,caption:null,description:null,image:null},pinterest:{enabled:!1,url:null,image:null,description:null},email:{enabled:!1,title:null,description:null}}},this.setup(t,e),this}"classList"in document.documentElement||!Object.defineProperty||"undefined"==typeof HTMLElement||Object.defineProperty(HTMLElement.prototype,"classList",{get:function(){var t,e,n;return n=function(t){return function(n){var o,i;o=e.className.split(/\s+/),i=o.indexOf(n),t(o,i,n),e.className=o.join(" ")}},e=this,t={add:n(function(t,e,n){~e||t.push(n)}),remove:n(function(t,e){~e&&t.splice(e,1)}),toggle:n(function(t,e,n){~e?t.splice(e,1):t.push(n)}),contains:function(t){return!!~e.className.split(/\s+/).indexOf(t)},item:function(t){return e.className.split(/\s+/)[t]||null}},Object.defineProperty(t,"length",{get:function(){return e.className.split(/\s+/).length}}),t}});var i={}.hasOwnProperty,r=function(t,e){function n(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t};n.prototype.extend=function(t,e,n){var o,i;for(i in e)o=void 0!==t[i],o&&"object"==typeof e[i]?this.extend(t[i],e[i],n):(n||!o)&&(t[i]=e[i])},n.prototype.hide=function(t){return t.style.display="none"},n.prototype.show=function(t){return t.style.display="block"},n.prototype.has_class=function(t,e){return t.classList.contains(e)},n.prototype.add_class=function(t,e){return t.classList.add(e)},n.prototype.remove_class=function(t,e){return t.classList.remove(e)},n.prototype.is_encoded=function(t){return t?(t=t.replace(/\%/g,""),decodeURIComponent(t)!==t):void 0},n.prototype.encode=function(t){return this.is_encoded(t)?t:encodeURIComponent(t)},n.prototype.data=function(t,e){return t?t.getAttribute("data-"+e):void 0},n.prototype.popover=function(t){var e=document.createElement("div");e.innerHTML=' ',document.body.appendChild(e),$("#shareQrcode").qrcode({width:300,height:300,text:t});var n=document.getElementsByClassName("share-modal")[0],o=document.getElementsByClassName("share-modal-close")[0];o.onclick=function(){n.parentNode.removeChild(n),o.onclick=null}},n.prototype.popup=function(t,e){var n,o,i,r;return null==e&&(e={}),o={width:500,height:350},o.top=screen.height/2-o.height/2,o.left=screen.width/2-o.width/2,i=function(){var t;t=[];for(n in e)r=e[n],t.push(n+"="+this.encode(r));return t}.call(this).join("&"),i&&(i="?"+i),window.open(t+i,"_blank","toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=550,height=500")},r(o,n),o.prototype.setup=function(t,e){var n,o,i,r,a;for(i=document.querySelectorAll(t),this.extend(this.config,e,!0),this.set_global_configuration(),this.normalize_network_configuration(),n=r=0,a=i.length;a>r;n=++r)o=i[n],this.setup_instance(t,n);this.config.callback()},o.prototype.setup_instance=function(t,e){var n,o,i,r,a,s,l;for(n=document.querySelectorAll(t)[e],this.hide(n),this.add_class(n,"sharer-"+e),this.inject_html(n),this.show(n),i=n.getElementsByTagName("li"),l=this,s=[],e=r=0,a=i.length;a>r;e=++r)o=i[e],s.push(o.addEventListener("click",function(){return l.event_network(n,this)}));return s},o.prototype.event_network=function(t,e){var n;return n=e.getAttribute("data-network"),this["network_"+n]()},o.prototype.public=function(t){var e,n,o,i,r,a,s;for(a=document.querySelectorAll(this.element),s=[],n=i=0,r=a.length;r>i;n=++i)o=a[n],e=o.getElementsByClassName("social")[0],s.push(this["event_"+t](e));return s},o.prototype.network_facebook=function(){return this.config.networks.facebook.load_sdk?window.FB?FB.ui({method:"feed",name:this.config.networks.facebook.title,link:this.config.networks.facebook.url,picture:this.config.networks.facebook.image,caption:this.config.networks.facebook.caption,description:this.config.networks.facebook.description}):console.error("The Facebook JS SDK hasn't loaded yet."):this.popup("https://www.facebook.com/sharer/sharer.php",{u:this.config.networks.facebook.url})},o.prototype.network_twitter=function(){return this.popup("https://twitter.com/intent/tweet",{text:this.config.networks.twitter.text,url:this.config.networks.twitter.url+"?utm_source=Twitter&utm_medium=shareLink&utm_campaign=socialShare"})},o.prototype.network_google_plus=function(){return this.popup("https://plus.google.com/share",{url:this.config.networks.google_plus.url})},o.prototype.network_pinterest=function(){return this.popup("https://www.pinterest.com/pin/create/button",{url:this.config.networks.pinterest.url,media:this.config.networks.pinterest.image,description:this.config.networks.pinterest.description})},o.prototype.network_email=function(){return this.popup("mailto:",{subject:this.config.networks.email.title,body:this.config.networks.email.description})},o.prototype.network_weibo=function(){var t="";return t=-1!==this.config.networks.weibo.url.indexOf("?")?this.config.networks.weibo.url+"&utm_source=Weibo&utm_medium=shareLink&utm_campaign=socialShare":this.config.networks.weibo.url+"?utm_source=Weibo&utm_medium=shareLink&utm_campaign=socialShare",this.popup("http://service.weibo.com/share/share.php",{title:this.config.networks.weibo.title.replace(/"/g,"%2522"),url:t,pic:this.config.networks.weibo.image,appkey:this.config.networks.weibo.appkey,searchPic:"false"})},o.prototype.network_wechart=function(){return this.popover(this.config.networks.wechart.url+"?utm_source=Wechat&utm_medium=shareLink&utm_campaign=socialShare")},o.prototype.network_renren=function(){return this.popup("http://widget.renren.com/dialog/share",{resourceUrl:this.config.networks.renren.image,pic:this.config.networks.renren.image,srcUrl:this.config.networks.renren.url+"?utm_source=Renren&utm_medium=shareLink&utm_campaign=socialShare",title:this.config.networks.renren.title,description:this.config.networks.renren.description,comment:this.config.networks.renren.comment||""})},o.prototype.network_tqq=function(){return this.popup("http://share.v.t.qq.com/index.php",{c:"share",a:"index",url:this.config.networks.tqq.url+"?utm_source=Tqq&utm_medium=shareLink&utm_campaign=socialShare",title:this.config.networks.tqq.title,appkey:this.config.networks.tqq.appkey,pic:this.config.networks.tqq.image})},o.prototype.network_douban=function(){return this.popup("http://www.douban.com/share/service",{href:this.config.networks.douban.url+"?utm_source=Douban&utm_medium=shareLink&utm_campaign=socialShare",name:this.config.networks.douban.title,image:this.config.networks.douban.image,text:this.config.networks.douban.description,comment:this.config.networks.douban.comment||""})},o.prototype.inject_html=function(t){t.innerHTML=''},o.prototype.hook=function(t,e,n){var o,i;o=this.config.networks[e][t],"function"==typeof o&&(i=o.call(this.config.networks[e],n),void 0!==i&&(i=this.normalize_filter_config_updates(i),this.extend(this.config.networks[e],i,!0),this.normalize_network_configuration()))},o.prototype.set_global_configuration=function(){var t,e,n,o,i,r;for(n in o)n||(this.config[n]=o[n]);i=this.config.networks,r=[];for(e in i){o=i[e];for(n in o)null==this.config.networks[e][n]&&(this.config.networks[e][n]=this.config[n]);this.config.networks[e].enabled?(t="block",this.config.enabled_networks+=1):t="none",r.push(this.config.networks[e].display=t)}return r},o.prototype.normalize_network_configuration=function(){return this.config.networks.facebook.app_id||(this.config.networks.facebook.load_sdk=!1),this.is_encoded(this.config.networks.twitter.description)||(this.config.networks.twitter.description=encodeURIComponent(this.config.networks.twitter.description)),"number"==typeof this.config.networks.facebook.app_id?this.config.networks.facebook.app_id=this.config.networks.facebook.app_id.toString():void 0},o.prototype.normalize_filter_config_updates=function(t){return this.config.networks.facebook.app_id!==t.app_id&&(console.warn("You are unable to change the Facebook app_id after the button has been initialized. Please update your Facebook filters accordingly."),delete t.app_id),this.config.networks.facebook.load_sdk!==t.load_sdk&&(console.warn("You are unable to change the Facebook load_sdk option after the button has been initialized. Please update your Facebook filters accordingly."),delete t.app_id),t},t.exports=o},function(t,e){"use strict";function n(t,e){this.setup(t,e)}n.prototype={constructor:n,setup:function(t,e){this.initAttr(t,e),this.initDom()},initAttr:function(t,e){this.element=$(t),this.options=$.extend({url:this.element.data("url"),shorturl:this.element.data("shorturl"),widgetScript:this.element.data("widgetscript")},e)},initDom:function(){var t=this.options.url,e=this.options.shorturl,n=this.options.widgetScript,o=''.replace(/{{url}}/g,t).replace(/{{shorturl}}/g,e);n&&(o+='');var i=this.element.find(".icon-sn-dotted");i.popover({html:!0,placement:"top",trigger:"manual",container:"body",content:o}),i.click(function(){$(this).popover("toggle")}),$("body").on("click",function(t){$(t.target).parents(".popover").length||t.target===i[0]||i.popover("hide")}),i.on("shown.bs.popover",function(){"undefined"===e&&$('[data-share-target="shorturl"]').hide(),$(".shareUrl, .shareWidgetScript").on("mouseenter",function(t){$(this).find("input").select()}),$(".shareWidgetScript input").val(n),$(".shareWidgetScript .copyUrl").data("clipboard-text",n),$(".shareUrl .copyWidgetScript").data("clipboard-text",t),$(".shareUrl [data-share-target]").click(function(n){var o=$(".shareUrl input");o.val()===t?(o.val(e),$(this).text("还原")):(o.val(t),$(this).text("缩短"))}),$('[data-toggle="tooltip"]').tooltip();var o=$(".copy");o.mouseout(function(){o.attr("title",""),o.attr("data-original-title","")}),o.click(function(t){try{$(this).parents(".input-group").find("input").select(),document.execCommand("copy"),$(this).attr("title","已复制").attr("data-original-title","已复制").tooltip("show")}catch(t){$(this).attr("title","无法复制!").attr("data-original-title","无法复制!").tooltip("show")}})})},destroy:function(){this.element.off().remove()}},t.exports=n},function(t,e,n){"use strict";function o(t,e,n){this.setup(t,e,n)}var i=n(3),r=n(2);o.prototype={constructor:o,setup:function(t,e,n){return this.initAttr(t,e),n?(this.initDom(),this.initShareMore(),void this.initNetwork()):void this.initNetwork(t)},initAttr:function(t,e){this.element=$(t),this.options=$.extend({url:this.element.data("url"),shorturl:this.element.data("shorturl"),title:this.element.data("title"),text:this.element.data("text"),image:this.element.data("image"),widgetScript:this.element.data("widgetscript")},e)},initDom:function(){var t=this.options.url,e=this.options.shorturl,n=this.options.widgetScript,o='将以上代码粘贴到其它支持嵌入 <script> 标签的网站
分享扩散:•••'.replace(/{{url}}/g,t).replace(/{{shorturl}}/g,e);this.element.html(o),this.element.find(".shareMore").data("widgetscript",n)},initShareMore:function(){this.more=new i(".shareMore")},initNetwork:function(t){this.network=new r(t||".widget-share-network",{image:this.options.image,title:this.options.title,text:this.options.text,callback:function(){$((t||".widget-share-network")+" .sn-inline a").tooltip()},networks:this.options.networks||{}})},destroy:function(){this.element.empty(),this.switchUrl&&this.switchUrl.destroy(),this.network.destroy()}},t.exports=o}])}),define("math",["jquery","main"],function(t,e){"use strict";return function(n){var o,i;o=n||t(".fmt"),"undefined"!=typeof MathJax?o.each(function(){MathJax.Hub.Queue(["Typeset",MathJax.Hub,this])}):(i=e.staticUrl+"/3rd/MathJax/MathJax.js",t.getScript(i,function(){MathJax.Hub.Config({extensions:["tex2jax.js"],jax:["input/TeX","output/HTML-CSS"],tex2jax:{inlineMath:[["\\(","\\)"]],displayMath:[["$$","$$"],["\\[","\\]"]],processEscapes:!0,ignoreClass:"side"},skipStartupTypeset:!0,showProcessingMessages:!1}),o.each(function(){MathJax.Hub.Queue(["Typeset",MathJax.Hub,this])})}))}}),function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define("Clipboard",[],t);else{var e;e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,e.Clipboard=t()}}(function(){var t;return function t(e,n,o){function i(a,s){if(!n[a]){if(!e[a]){var l="function"==typeof require&&require;if(!s&&l)return l(a,!0);if(r)return r(a,!0);var c=new Error("Cannot find module '"+a+"'");throw c.code="MODULE_NOT_FOUND",c}var u=n[a]={exports:{}};e[a][0].call(u.exports,function(t){var n=e[a][1][t];return i(n?n:t)},u,u.exports,t,e,n,o)}return n[a].exports}for(var r="function"==typeof require&&require,a=0;a'),e.remove()},u=/((?:0\u20E3|1\u20E3|2\u20E3|3\u20E3|4\u20E3|5\u20E3|6\u20E3|7\u20E3|8\u20E3|9\u20E3|#\u20E3|\*\u20E3|\uD83C(?:\uDDE6\uD83C(?:\uDDE8|\uDDE9|\uDDEA|\uDDEB|\uDDEC|\uDDEE|\uDDF1|\uDDF2|\uDDF4|\uDDF6|\uDDF7|\uDDF8|\uDDF9|\uDDFA|\uDDFC|\uDDFD|\uDDFF)|\uDDE7\uD83C(?:\uDDE6|\uDDE7|\uDDE9|\uDDEA|\uDDEB|\uDDEC|\uDDED|\uDDEE|\uDDEF|\uDDF1|\uDDF2|\uDDF3|\uDDF4|\uDDF6|\uDDF7|\uDDF8|\uDDF9|\uDDFB|\uDDFC|\uDDFE|\uDDFF)|\uDDE8\uD83C(?:\uDDE6|\uDDE8|\uDDE9|\uDDEB|\uDDEC|\uDDED|\uDDEE|\uDDF0|\uDDF1|\uDDF2|\uDDF3|\uDDF4|\uDDF5|\uDDF7|\uDDFA|\uDDFB|\uDDFC|\uDDFD|\uDDFE|\uDDFF)|\uDDE9\uD83C(?:\uDDEA|\uDDEC|\uDDEF|\uDDF0|\uDDF2|\uDDF4|\uDDFF)|\uDDEA\uD83C(?:\uDDE6|\uDDE8|\uDDEA|\uDDEC|\uDDED|\uDDF7|\uDDF8|\uDDF9|\uDDFA)|\uDDEB\uD83C(?:\uDDEE|\uDDEF|\uDDF0|\uDDF2|\uDDF4|\uDDF7)|\uDDEC\uD83C(?:\uDDE6|\uDDE7|\uDDE9|\uDDEA|\uDDEB|\uDDEC|\uDDED|\uDDEE|\uDDF1|\uDDF2|\uDDF3|\uDDF5|\uDDF6|\uDDF7|\uDDF8|\uDDF9|\uDDFA|\uDDFC|\uDDFE)|\uDDED\uD83C(?:\uDDF0|\uDDF2|\uDDF3|\uDDF7|\uDDF9|\uDDFA)|\uDDEE\uD83C(?:\uDDE8|\uDDE9|\uDDEA|\uDDF1|\uDDF2|\uDDF3|\uDDF4|\uDDF6|\uDDF7|\uDDF8|\uDDF9)|\uDDEF\uD83C(?:\uDDEA|\uDDF2|\uDDF4|\uDDF5)|\uDDF0\uD83C(?:\uDDEA|\uDDEC|\uDDED|\uDDEE|\uDDF2|\uDDF3|\uDDF5|\uDDF7|\uDDFC|\uDDFE|\uDDFF)|\uDDF1\uD83C(?:\uDDE6|\uDDE7|\uDDE8|\uDDEE|\uDDF0|\uDDF7|\uDDF8|\uDDF9|\uDDFA|\uDDFB|\uDDFE)|\uDDF2\uD83C(?:\uDDE6|\uDDE8|\uDDE9|\uDDEA|\uDDEB|\uDDEC|\uDDED|\uDDF0|\uDDF1|\uDDF2|\uDDF3|\uDDF4|\uDDF5|\uDDF6|\uDDF7|\uDDF8|\uDDF9|\uDDFA|\uDDFB|\uDDFC|\uDDFD|\uDDFE|\uDDFF)|\uDDF3\uD83C(?:\uDDE6|\uDDE8|\uDDEA|\uDDEB|\uDDEC|\uDDEE|\uDDF1|\uDDF4|\uDDF5|\uDDF7|\uDDFA|\uDDFF)|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C(?:\uDDE6|\uDDEA|\uDDEB|\uDDEC|\uDDED|\uDDF0|\uDDF1|\uDDF2|\uDDF3|\uDDF7|\uDDF8|\uDDF9|\uDDFC|\uDDFE)|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C(?:\uDDEA|\uDDF4|\uDDF8|\uDDFA|\uDDFC)|\uDDF8\uD83C(?:\uDDE6|\uDDE7|\uDDE8|\uDDE9|\uDDEA|\uDDEC|\uDDED|\uDDEE|\uDDEF|\uDDF0|\uDDF1|\uDDF2|\uDDF3|\uDDF4|\uDDF7|\uDDF8|\uDDF9|\uDDFB|\uDDFD|\uDDFE|\uDDFF)|\uDDF9\uD83C(?:\uDDE6|\uDDE8|\uDDE9|\uDDEB|\uDDEC|\uDDED|\uDDEF|\uDDF0|\uDDF1|\uDDF2|\uDDF3|\uDDF4|\uDDF7|\uDDF9|\uDDFB|\uDDFC|\uDDFF)|\uDDFA\uD83C(?:\uDDE6|\uDDEC|\uDDF2|\uDDF8|\uDDFE|\uDDFF)|\uDDFB\uD83C(?:\uDDE6|\uDDE8|\uDDEA|\uDDEC|\uDDEE|\uDDF3|\uDDFA)|\uDDFC\uD83C(?:\uDDEB|\uDDF8)|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C(?:\uDDEA|\uDDF9)|\uDDFF\uD83C(?:\uDDE6|\uDDF2|\uDDFC)))|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2648-\u2653\u2660\u2663\u2665\u2666\u2668\u267B\u267F\u2692-\u2694\u2696\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD79\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED0\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3]|\uD83E[\uDD10-\uDD18\uDD80-\uDD84\uDDC0])/g,a?(a.find("h1, h2, h3, strong").each(function(){return $(this).html($(this).html().replace(u,'$1'))}),a.find("span.emoji").each(function(){return d($(this))})):($("h1, h2, h3, strong").each(function(){return $(this).html($(this).html().replace(u,'$1'))}),$("span.emoji").each(function(){return d($(this))})),h=function(t){var e,n,o,i;return e=document,i=t.get(0),e.body.createTextRange?(n=e.body.createTextRange(),n.moveToElementText(i),n.select()):window.getSelection?(o=window.getSelection(),n=e.createRange(),n.selectNodeContents(i),o.removeAllRanges(),o.addRange(n)):void 0},c=function(t){var e,o,i,r;r='\n \n ',i=$(r),t.before(i),$('[data-toggle="tooltip"]').tooltip({container:"body"}),o=i.find(".copyCode"),e=t.children("code"),t.hoverIntent({interval:50,over:function(){i.show()},out:function(){i.is(":hover")||i.hide()}}),i.hoverIntent({interval:50,over:function(){},out:function(){t.is(":hover")||i.hide()}}),i.find(".selectCode").click(function(){return h(e)}),o.attr("data-clipboard-text",e.text());var a=new n(".copyCode");a.on("success",function(t){$(".copyCode").attr("data-original-title","复制"),$(t.trigger).attr("data-original-title","已复制").tooltip("show"),t.clearSelection()}),a.on("error",function(t){$(t.trigger).prev().trigger("click"),$(".copyCode").attr("data-original-title","复制"),$(t.trigger).attr("data-original-title","按 ⌘+c 复制").tooltip("show")})},p=function(t){var e,n,o,s,l,u,p,d,h,f,m,g;f=t,u={actionscript:/^as[1-3]$/i,cmake:/^(make|makefile)$/i,cs:/^csharp$/i,typescript:/^ts$/i,css:/^css[1-3]$/i,javascript:/^js$/i,markdown:/^md$/i,objectivec:/^(oc|objective-c)$/i,php:/^php[1-6]$/i,sql:/^mysql$/i,xml:/^(html|html5|xhtml)$/i,flow:/^flow$/i,sequence:/^sequence$/i},s=void 0,l=["objectivec","lisp","scala","typescript","groovy","sql","actionscript","xml","markdown","perl","java","bash","shell","clojure","kotlin","fortran","lua","swift","json","nginx","ini","css","javascript","makefile","ruby","basic","cs","coffeescript","go","php","erlang","cpp","haskell","properties","diff","apache","dart","rust","cmake","r","python"],o=void 0,e=void 0,h=!1,g=!1,2===f.children("code").length?(e=f.children("code").first().text(),f.children("code").first().remove(),o=f.children("code").addClass(e)):(o=f.children("code"),1===o.text().split("\n").length&&o.css({"word-break":"break-word","white-space":"initial"}),e=o.attr("class")),e&&(n=e.split(/\s+/),n.indexOf("nohighlight")!==-1&&(h=!0),n.forEach(function(t){var e,n;if(n=t.toLowerCase(),l.indexOf(n)!==-1)s=n;else for(e in u)n.match(u[e])&&(s=e)}),s&&f.attr("class",s)),s&&("flow"===s?(d=$(".flowChart").length,o.parent().after(''),r("flow",[o.text(),"flowDiagram"+d]),o.parent().remove(),g=!0):"sequence"===s&&(a=o.parent(),m=o.text(),d=$(".sequenceChart").length,a.replaceWith(' '+m+""),r("sequence",$("#sequenceDiagram"+d)),g=!0)),h||g||(p=f.html(),p.length<1e4&&i(f[0])),c(f)},a?(l=s(a.text()),l&&e(a),a.find("pre").each(function(){p($(this))})):($(".fmt").each(function(){var t=$(this);s(t.text())&&e(t)}),$(".fmt pre").each(function(){p($(this))}))}}),function(t){t.fn.qrcode=function(e){function n(t){this.mode=s,this.data=t}function o(t,e){this.typeNumber=t,this.errorCorrectLevel=e,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}function i(t,e){if(void 0==t.length)throw Error(t.length+"/"+e);for(var n=0;nt||this.moduleCount<=t||0>e||this.moduleCount<=e)throw Error(t+","+e);return this.modules[t][e]},getModuleCount:function(){return this.moduleCount},make:function(){if(1>this.typeNumber){for(var t=1,t=1;40>t;t++){for(var e=r.getRSBlocks(t,this.errorCorrectLevel),n=new a,o=0,i=0;i =n;n++)if(!(-1>=t+n||this.moduleCount<=t+n))for(var o=-1;7>=o;o++)-1>=e+o||this.moduleCount<=e+o||(this.modules[t+n][e+o]=0<=n&&6>=n&&(0==o||6==o)||0<=o&&6>=o&&(0==n||6==n)||2<=n&&4>=n&&2<=o&&4>=o)},getBestMaskPattern:function(){for(var t=0,e=0,n=0;8>n;n++){this.makeImpl(!0,n);var o=l.getLostPoint(this);(0==n||t>o)&&(t=o,e=n)}return e},createMovieClip:function(t,e,n){for(t=t.createEmptyMovieClip(e,n),this.make(),e=0;e =r;r++)for(var a=-2;2>=a;a++)this.modules[o+r][i+a]=-2==r||2==r||-2==a||2==a||0==r&&0==a}},setupTypeNumber:function(t){for(var e=l.getBCHTypeNumber(this.typeNumber),n=0;18>n;n++){var o=!t&&1==(e>>n&1);this.modules[Math.floor(n/3)][n%3+this.moduleCount-8-3]=o}for(n=0;18>n;n++)o=!t&&1==(e>>n&1),this.modules[n%3+this.moduleCount-8-3][Math.floor(n/3)]=o},setupTypeInfo:function(t,e){for(var n=l.getBCHTypeInfo(this.errorCorrectLevel<<3|e),o=0;15>o;o++){var i=!t&&1==(n>>o&1);6>o?this.modules[o][8]=i:8>o?this.modules[o+1][8]=i:this.modules[this.moduleCount-15+o][8]=i}for(o=0;15>o;o++)i=!t&&1==(n>>o&1),8>o?this.modules[8][this.moduleCount-o-1]=i:9>o?this.modules[8][15-o-1+1]=i:this.modules[8][15-o-1]=i;this.modules[this.moduleCount-8][8]=!t},mapData:function(t,e){for(var n=-1,o=this.moduleCount-1,i=7,r=0,a=this.moduleCount-1;0s;s++)if(null==this.modules[o][a-s]){var c=!1;r >>i&1)),l.getMask(e,o,a-s)&&(c=!c),this.modules[o][a-s]=c,i--,-1==i&&(r++,i=7)}if(o+=n,0>o||this.moduleCount<=o){o-=n,n=-n;break}}}},o.PAD0=236,o.PAD1=17,o.createData=function(t,e,n){for(var e=r.getRSBlocks(t,e),i=new a,s=0;s "}e+=""}e.length>0&&$("#paradigm-article-related").html('8*t)throw Error("code length overflow. ("+i.getLengthInBits()+">"+8*t+")");for(i.getLengthInBits()+4<=8*t&&i.put(0,4);0!=i.getLengthInBits()%8;)i.putBit(!1);for(;!(i.getLengthInBits()>=8*t)&&(i.put(o.PAD0,8),!(i.getLengthInBits()>=8*t));)i.put(o.PAD1,8);return o.createBytes(i,e)},o.createBytes=function(t,e){for(var n=0,o=0,r=0,a=Array(e.length),s=Array(e.length),c=0;c >>=1;return e},getPatternPosition:function(t){return l.PATTERN_POSITION_TABLE[t-1]},getMask:function(t,e,n){switch(t){case 0:return 0==(e+n)%2;case 1:return 0==e%2;case 2:return 0==n%3;case 3:return 0==(e+n)%3;case 4:return 0==(Math.floor(e/2)+Math.floor(n/3))%2;case 5:return 0==e*n%2+e*n%3;case 6:return 0==(e*n%2+e*n%3)%2;case 7:return 0==(e*n%3+(e+n)%2)%2;default:throw Error("bad maskPattern:"+t)}},getErrorCorrectPolynomial:function(t){for(var e=new i([1],0),n=0;n e)switch(t){case 1:return 10;case 2:return 9;case s:return 8;case 8:return 8;default:throw Error("mode:"+t)}else if(27>e)switch(t){case 1:return 12;case 2:return 11;case s:return 16;case 8:return 10;default:throw Error("mode:"+t)}else{if(!(41>e))throw Error("type:"+e);switch(t){case 1:return 14;case 2:return 13;case s:return 16;case 8:return 12;default:throw Error("mode:"+t)}}},getLostPoint:function(t){for(var e=t.getModuleCount(),n=0,o=0;o =s;s++)if(!(0>o+s||e<=o+s))for(var l=-1;1>=l;l++)0>i+l||e<=i+l||0==s&&0==l||a==t.isDark(o+s,i+l)&&r++;5 t)throw Error("glog("+t+")");return c.LOG_TABLE[t]},gexp:function(t){for(;0>t;)t+=255;for(;256<=t;)t-=255;return c.EXP_TABLE[t]},EXP_TABLE:Array(256),LOG_TABLE:Array(256)},u=0;8>u;u++)c.EXP_TABLE[u]=1<u;u++)c.EXP_TABLE[u]=c.EXP_TABLE[u-4]^c.EXP_TABLE[u-5]^c.EXP_TABLE[u-6]^c.EXP_TABLE[u-8];for(u=0;255>u;u++)c.LOG_TABLE[c.EXP_TABLE[u]]=u;return i.prototype={get:function(t){return this.num[t]},getLength:function(){return this.num.length},multiply:function(t){for(var e=Array(this.getLength()+t.getLength()-1),n=0;n this.getLength()-t.getLength())return this;for(var e=c.glog(this.get(0))-c.glog(t.get(0)),n=Array(this.getLength()),o=0;o >>7-t%8&1)},put:function(t,e){for(var n=0;n >>e-n-1&1))},getLengthInBits:function(){return this.length},putBit:function(t){var e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}},"string"==typeof e&&(e={text:e}),e=t.extend({},{render:"canvas",width:256,height:256,typeNumber:-1,correctLevel:2,background:"#ffffff",foreground:"#000000"},e),this.each(function(){var n;if("canvas"==e.render){n=new o(e.typeNumber,e.correctLevel),n.addData(e.text),n.make();var i=document.createElement("canvas");i.width=e.width,i.height=e.height;for(var r=i.getContext("2d"),a=e.width/n.getModuleCount(),s=e.height/n.getModuleCount(),l=0;l ").css("width",e.width+"px").css("height",e.height+"px").css("border","0px").css("border-collapse","collapse").css("background-color",e.background),r=e.width/n.getModuleCount(),a=e.height/n.getModuleCount(),s=0;s ").css("height",a+"px").appendTo(i),c=0;c ").css("width",r+"px").css("background-color",n.isDark(s,c)?e.foreground:e.background).appendTo(l);n=i,jQuery(n).appendTo(this)})}}(jQuery),define("jquery_qrcode",["jquery"],function(t){return function(){var e;return e||t.$.fn.qrcode}}(this)),define("sf_pay",["jquery","sfModal","isMobile","pingpp","jquery_qrcode"],function(t,e,n,o){return function(i){var r=void 0;r=0===i.type?'\n \n \n '+(i.isDiscounted?'\n ":'\n \n讲座价格 ¥'+i.originPrice+'
优惠 ¥'+i.discountPrice+'
':"")+'\n \n 付款金额(元)\n\n '+i.price+'\n
\n \n \n \n '+(i.isLive?'付款即表示你同意《讲堂服务协议》
':"")+"\n\n\n ",e({title:i.title,modalSize:"modal-sm",$content:r,hideClose:!0,hideDone:!0,show:function(){var r=navigator.userAgent.toLowerCase();n("any")?/micromessenger/.test(r)?t(".btn--wechat").removeClass("hide"):t(".btn--alipay").removeClass("hide"):(t(".btn--alipay").removeClass("hide"),t(".btn--wechat").removeClass("hide"));var a=function(n,r){if(i.formData.paymentMethod=n,1===i.type){var a=t(".sf__pay-price-number").html().trim();i.formData.amount=a,i.formData.price=a}var s=t(".sf__pay-validate"),l=t(this);l.prop("disabled",!0),s.addClass("invisible"),t.post(i.api,i.formData,function(a){if(l.prop("disabled",!1),a.status){if("form"===a.data[0]){var c=_.reduce(a.data[1],function(t,e){return t+e+"\n 付款金额(元)\n
\n\n '+i.price.toFixed(2)+'\n\n \n\n \n \n \n \n \n \n\n \n \n '+(i.isLive?'付款即表示你同意《讲堂服务协议》
':"")+"\n
"},"");s.html(c).removeClass("invisible")}}else{var u=a.data;switch(n){case"wx_pub":u.extra=r,o.createPayment(u,function(e,n){"success"==e?t.get("/api/pay/"+u.order_no+"/check",function(t){!t.status&&t.data&&(location.href=t.data)}):"fail"==e&&alert(n.msg)});break;case"wx_pub_qr":var p=u.credential?u.credential.wx_pub_qr:null,d="/pay/check?out_trade_no="+u.order_no;if(p){var h=function(){var t='\n \n\n \n';return t};e({title:i.title,hideClose:!0,hideDone:!0,modalSize:"modal-sm",$content:h(),show:function(){t(".wx_pub_qr").qrcode({text:p,width:180,height:180});var e=setInterval(function(){t.get("/api/pay/"+u.order_no+"/check",function(t){!t.status&&t.data&&(clearInterval(e),location.href=t.data)})},5e3)}})}break;case"alipay_qr":var p=u.credential?u.credential.alipay_qr:null,d="/pay/check?out_trade_no="+u.order_no;if(p){var f=function(){var t='\n \n微信扫码支付
\n\n 付款成功后点此刷新\n
\n\n \n';return t};e({title:i.title,hideClose:!0,hideDone:!0,modalSize:"modal-sm",$content:f(),show:function(){t(".wx_pub_qr").qrcode({text:p,height:180,width:180});var e=setInterval(function(){t.get("/api/pay/"+u.order_no+"/check",function(t){!t.status&&t.data&&(clearInterval(e),location.href=t.data)})},5e3)}})}break;default:o.createPayment(u,function(t,e){"success"==t||"fail"==t&&s.html("支付暂不可用 "+e.msg).removeClass("invisible")})}}})};t(".sfmodal").on("click",".sf__pay-btn--alipay",function(){if(n("any")){var t={app_pay:!0};a.call(this,"alipay_wap",t)}else a.call(this,"alipay_qr")}),t(".sfmodal").on("click",".sf__pay-btn--wechat",function(){var e=this,o="wx_pub_qr";/micromessenger/.test(r)?(o="wx_pub",t.get("/api/user/weixin/openid",function(t){if(t.data.match(/^https?/i))location.href=t.data;else{var n={open_id:t.data};a.call(e,o,n)}})):n("any")?a.call(e,o):a.call(e,o)})}}),1===i.type&&(t("body").on("click",".sf__pay-price-sample .btn",function(){var e=t(this),n=e.data("price"),o=t(".sf__pay-price-number");o.html(n),t(".sf__pay-price-sample .btn.active").removeClass("active"),e.addClass("active")}),t("body").on("focus",".sf__pay-price-number",function(){t(".sf__pay-price-sample .btn.active").removeClass("active")}),t("body").on("input",".sf__pay-price-number",function(){var e=t(this).html();isNaN(e)?t(this).html(""):Number.isInteger(Number(e))||e.split(".")[1].length>2&&t(this).html(Number(e).toFixed(2))}))}}),define("specialUrl",["jquery","jquery_tmpl"],function(t){var e,n,o,i,r,a,s,l,c,u;c=function(e,n){var o,i;o=t(".v_"+e),i=o.after(t.tmpl(l,n)).next(".video-prev"),i.click(function(){i.hide(),i.after(t.tmpl(s,n)).next(".video-body").find(".hide-video").click(function(){i.show(),t(this).parent().remove()})}),o.remove()},i=0,r=[{reg:/^https?:\/\/jsfiddle\.net\/([_a-z0-9-\/,]+)$/i,fn:function(e){e.indexOf("embedded")<0&&(e+=/\/$/.test(e)?"embedded":"/embedded"),e="https://jsfiddle.net/"+e,t('').insertAfter(this)}},{reg:/^https?:\/\/gist\.github\.com\/([_a-z0-9-\/]+)$/i,fn:function(e){var n,o,r,a,s,l,c;c="https://gist.github.com/"+e+".json?callback=special_"+i,r=t('').insertAfter(this),s=r[0],a=s.contentWindow?s.contentWindow.document:s.contentDocument?s.contentDocument:s.document,l=a.createElement("script"),o=t(a),n=t("body",o),r.ready(function(){r.height(o.height())}),s.contentWindow["special_"+i]=function(t){n.append(t.div).css({padding:0,margin:0}),o.find("head").append(''),o.find("head").append(""),setTimeout(function(){r.height(o.height())},5e3)},l.type="text/javascript",l.src=c,a.body.appendChild(l),i++}},{reg:/^https?:\/\/runjs\.cn\/detail\/([_0-9a-z-]+)$/i,fn:function(e){var n,o,i,r,a,s,l;n=function(){t("body",o).css("margin",0),t(".runjs_gist",o).css("border","none"),t(".gist_content",o).css("font-size","14px")},t("#special-runjs"+e).length>0||(l="https://runjs.cn/gist/"+e+"/all",i=t('').insertAfter(this),r=i[0],o=r.contentWindow?r.contentWindow.document:r.contentDocument?r.contentDocument:r.document, s=o.createElement("script"),a=o||o.__proto__,a.write=function(e){t(e).appendTo(o.body)},s.type="text/javascript",s.src=l,o.body.appendChild(s),s.onreadystatechange=n,s.onload=n)}},{reg:/^https?:\/\/codepen\.io\/([_a-zA-Z0-9-\/,]+)$/i,fn:function(e){e.indexOf("embed")<0&&(e=e.replace("pen","embed")),e="https://codepen.io/"+e,t('').insertAfter(this)}},{reg:/^https?:\/\/segmentfault\.com\/n\/([_a-zA-Z0-9-\/,\.]+)$/i,fn:function(e){return e="https://segmentfault.com/n/"+e+"/widget",t('').insertAfter(this),t(this).prev("a").remove()}}],l='支付宝扫码支付
\n\n 付款成功后点此刷新\n
\n';$("body").prepend(c),$("body").on("touchend",".fa-close",function(t){t.preventDefault(),$(".app-open-in-bar").remove()})}if(t("Android")&&!l){var u=' ';$("body").prepend(u);var p=navigator.userAgent.toLowerCase();/micromessenger/.test(p)?$(".download-btn").attr("href",a+"#android"):$("body").on("click",".download-btn",function(t){setTimeout(function(){location.href="/app"},1e3)}),$("body").on("touchend",".fa-close",function(t){t.preventDefault(),$(".app-open-in-bar").remove()})}}),requirejs(["main","pingpp","isMobile","commentNews","bookmark","statusToggle","sfModal","sf_share","highLight","sf_pay","template","specialUrl","contentIndex","sf_tagpopup","userFollow","911","jquery_cookie","jquery_lazyload","jquery_qrcode","underscore","openInApp","jquery_qrcode"],function(t,e,n,o,i,r,a,s,l,c,u,p,d){var h,f,m,g,v,y,b,_,w,k,x,D,C,S,E,A;l($(".article.fmt")),$(".tagPopup .tag").tagpopup(),$(".fmt").find("img").lazyload({data_attribute:"src"}),p(),function(){"undefined"!=typeof ParadigmSDK&&ParadigmSDK.getRecommItems("594",function(t){for(var e="",o=n("any"),i=0;i',s='${title}
${link}',e=void 0,o=void 0,a=void 0,u=void 0;var p=!1;return n=new RegExp(window.location.host,"ig"),function(){t(".fmt a").each(function(e){var i,a,s=!1,l=t(this),i=l.attr("href"),u=/^https?:\/\//.test(i);if(!n.test(i)&&u){l.attr("target","_blank");var d=i.indexOf("?"),h=i;d>0&&(i=i.substring(0,d));var f=i.indexOf("#");if(f>0&&(i=i.substring(0,f)),t.each(r,function(t,e){s||(o=i.match(e.reg),o&&(l.after(''),s=!0))}),!s)if(!p&&i.match(/\.(mp3|m3u)$/i)){var m=t(''),g=document.createElement("link");t("").append(m).insertBefore(l),g.type="text/css",g.rel="stylesheet",g.href="//cdn.staticfile.org/mediaelement/4.2.9/mediaelementplayer.min.css",document.getElementsByTagName("head")[0].appendChild(g),p=!0,l.html("下载音频").attr("download",i.substring(i.lastIndexOf("/")+1)),require.config({paths:{mediaelement:"//cdn.staticfile.org/mediaelement/4.2.9/mediaelement-and-player.min"}}),require(["mediaelement"],function(){mejs.i18n.language("zh-CN"),m.mediaelementplayer({stretching:"responsive"})})}else i.match(/youku\.com/g)?(a=i.match(/id_\w+/),a&&(a=a[0].slice(3),l.addClass("v_"+a+"_"+e),t.get("https://openapi.youku.com/v2/videos/show_basic.json?video_id="+a+"&client_id=8fdab46779dd5d25",function(t){c(a+"_"+e,t)}))):i.match(/tudou\.com/g)&&(/albumplay/.test(i)||/listplay/.test(i))&&(a=i.match(/http:\/\/www\.tudou\.com\/.+\/.+\/(.+)\.html/)[1],a&&(l.addClass("v_"+a+"_"+e),t.get("/api/util/video/info?app_key=269fe846bb7a17ec&format=json&itemCodes="+a,function(t){var n;t=t.data[0],n={thumbnail:t.picUrl,title:t.title,link:t.playUrl,player:t.outerPlayerUrl},c(a+"_"+e,n)})))}}),t(".fmt").delegate(".preview","click",function(){r[t(this).data("typeid")].fn.call(this,t(this).data("url")),t(this).siblings("iframe").addClass("loading"),t(this).remove()}),t(".fmt img").not(".emoji").each(function(e){var n,o;o=new RegExp(window.location.origin,"i"),n=t(this).data("src"),t(this).css("cursor","pointer"),t(this).click(function(){if(0===t("#previewImg").length){if(t("body").addClass("isPreviewing").append(''),o.test(n)||/^\/img\//i.test(n)){var e=t(this).attr("src"),i=e.indexOf("?"),r=void 0;r=i!=-1?e.slice(0,i)+"/view"+e.slice(i,e.length):e+"/view",t("#previewImg img")[0].src=e,t("#previewImg .link-orign").attr("href",r)}else t("#previewImg img")[0].src=t(this).attr("src"),t("#previewImg .link-orign").attr("href",t(this).attr("src"));t("#previewImg img")[0].onload=function(){t("#previewImg .loadingDot").remove(),this.height>window.innerHeight&&(t("#previewImg .imgWrapper").css({lineHeight:window.innerHeight+"px"}),t("#previewImg").css("overflow-y","scroll")),this.width>window.innerWidth&&(t("#previewImg img").css("width","100%"),t("#previewImg .imgWrapper").css({lineHeight:"initial"}))},t("#previewImg").click(function(e){t(this).remove(),t("body").removeClass("isPreviewing")})}})})}}),define("contentIndex",[],function(){var t;return t=function(t,e,n){var o,i,r,a,s,l,c,u,p,d;o=$(t),i=o.find(".collapse"),a=o.find(".panel-collapse"),r=o.find("h1, h2, h3"),$(e).parents(".side").length&&($(".side").find(".post-nav").addClass("side-outline hidden-sm").data("width",$(".side-outline").width()).data("top",$(".side-outline").offset().top),l=$(".side-outline"),s=l.find(".highlight-title"),u=l.offset().top,$(".nav-body").css("top",0),$(".post-nav").css("position","sticky"),$(".post-nav").css("top","238px"),$(".side").height($(".main").height()),$(".nav-body").height($(window).height()-300),$.fn.scrollUnique=function(){return $(this).each(function(){var t="mousewheel";void 0!==document.mozHidden&&(t="DOMMouseScroll"),$(this).on(t,function(t){var e=this.scrollTop,n=this.scrollHeight,o=this.clientHeight,i=t.originalEvent.wheelDelta?t.originalEvent.wheelDelta:-(t.originalEvent.detail||0);(i>0&&e<=i||i<0&&n-o-e<=-1*i)&&(this.scrollTop=i>0?0:n,t.preventDefault())})})},document.querySelector(".nav-body").scrollHeight>$(".nav-body").height()&&$(".nav-body").scrollUnique(),$(window).scroll(function(){$(".side").height($(".main").height());var t,n,o,i;n=$(this).scrollTop(),i=void 0,t=void 0,o=void 0,r.eq(0).offset().topn+20||o<20){if(o<20&&(t=l.find("a").last()),t.offset()&&(i=t.offset().top-t.parents(".nav-body").offset().top+$(".nav-body").scrollTop()),t.parents(e).find("li").removeClass("active"),t.parent().addClass("active"),s.css("top",i).height(t.outerHeight()),i+40>$(window).height()/2){var u=-(t.parent().offset().top-t.parents(".nav-body").offset().top+$(".nav-body").scrollTop()-$(window).height()/2);u<0&&$(".nav-body").scrollTop(-u)}else $(".nav-body").scrollTop(0);return!1}})):($(e).find("li").removeClass("active"),s.hide())})),p=1,c=$(e),r.each(function(t){var n,o,i;i=$(this).text().trim(),""!==i&&($(this).attr("id","articleHeader"+t),o=parseInt($(this)[0].tagName.slice(1)),n=null,0===t||o===p?(n=$(' '),n.find("a").text(i),c.append(n)):o>p?(n=$(" '),n.find("a").text(i),c.append(n),c=n.find("ul")):o '),n.find("a").text(i),$(e).append(n),c=$(e)):(n=$("
'),n.find("a").text(i),c.parents("ul").parents("ul").length?(c.parents("ul").parents("ul").append(n),c=n.find("ul")):(n=$(' '),n.find("a").text(i),$(e).append(n),c=$(e)))),p=o)}),n&&n(i,a),d=location.hash,d.split("?").length>0&&"#shareToWeibo"!==d.split("?")[0]&&$(d).length>0&&$(window).scrollTop($(d).offset().top)}}),!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("handlebars",e):"object"==typeof exports?exports.Handlebars=e():t.Handlebars=e()}(this,function(){return function(t){function e(o){if(n[o])return n[o].exports;var i=n[o]={exports:{},id:o,loaded:!1};return t[o].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){"use strict";function o(){var t=v();return t.compile=function(e,n){return u.compile(e,n,t)},t.precompile=function(e,n){return u.precompile(e,n,t)},t.AST=l.default,t.Compiler=u.Compiler,t.JavaScriptCompiler=d.default,t.Parser=c.parser,t.parse=c.parse,t}var i=n(8).default;e.__esModule=!0;var r=n(1),a=i(r),s=n(2),l=i(s),c=n(3),u=n(4),p=n(5),d=i(p),h=n(6),f=i(h),m=n(7),g=i(m),v=a.default.create,y=o();y.create=o,g.default(y),y.Visitor=f.default,y.default=y,e.default=y,t.exports=e.default},function(t,e,n){"use strict";function o(){var t=new s.HandlebarsEnvironment;return h.extend(t,s),t.SafeString=c.default,t.Exception=p.default,t.Utils=h,t.escapeExpression=h.escapeExpression,t.VM=m,t.template=function(e){return m.template(e,t)},t}var i=n(9).default,r=n(8).default;e.__esModule=!0;var a=n(10),s=i(a),l=n(11),c=r(l),u=n(12),p=r(u),d=n(13),h=i(d),f=n(14),m=i(f),g=n(7),v=r(g),y=o();y.create=o,v.default(y),y.default=y,e.default=y,t.exports=e.default},function(t,e,n){"use strict";e.__esModule=!0;var o={helpers:{helperExpression:function(t){return"SubExpression"===t.type||("MustacheStatement"===t.type||"BlockStatement"===t.type)&&!!(t.params&&t.params.length||t.hash)},scopedId:function(t){return/^\.|this\b/.test(t.original)},simpleId:function(t){return 1===t.parts.length&&!o.helpers.scopedId(t)&&!t.depth}}};e.default=o,t.exports=e.default},function(t,e,n){"use strict";function o(t,e){if("Program"===t.type)return t;s.default.yy=h,h.locInfo=function(t){return new h.SourceLocation(e&&e.srcName,t)};var n=new c.default(e);return n.accept(s.default.parse(t))}var i=n(8).default,r=n(9).default;e.__esModule=!0,e.parse=o;var a=n(15),s=i(a),l=n(16),c=i(l),u=n(17),p=r(u),d=n(13);e.parser=s.default;var h={};d.extend(h,p)},function(t,e,n){"use strict";function o(){}function i(t,e,n){if(null==t||"string"!=typeof t&&"Program"!==t.type)throw new u.default("You must pass a string or Handlebars AST to Handlebars.precompile. You passed "+t);e=e||{},"data"in e||(e.data=!0),e.compat&&(e.useDepths=!0);var o=n.parse(t,e),i=(new n.Compiler).compile(o,e);return(new n.JavaScriptCompiler).compile(i,e)}function r(t,e,n){function o(){var o=n.parse(t,e),i=(new n.Compiler).compile(o,e),r=(new n.JavaScriptCompiler).compile(i,e,void 0,!0);return n.template(r)}function i(t,e){return r||(r=o()),r.call(this,t,e)}if(void 0===e&&(e={}),null==t||"string"!=typeof t&&"Program"!==t.type)throw new u.default("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+t);"data"in e||(e.data=!0),e.compat&&(e.useDepths=!0);var r=void 0;return i._setup=function(t){return r||(r=o()),r._setup(t)},i._child=function(t,e,n,i){return r||(r=o()),r._child(t,e,n,i)},i}function a(t,e){if(t===e)return!0;if(p.isArray(t)&&p.isArray(e)&&t.length===e.length){for(var n=0;n n;n++){var o=this.opcodes[n],i=t.opcodes[n];if(o.opcode!==i.opcode||!a(o.args,i.args))return!1}e=this.children.length;for(var n=0;e>n;n++)if(!this.children[n].equals(t.children[n]))return!1;return!0},guid:0,compile:function(t,e){this.sourceNode=[],this.opcodes=[],this.children=[],this.options=e,this.stringParams=e.stringParams,this.trackIds=e.trackIds,e.blockParams=e.blockParams||[];var n=e.knownHelpers;if(e.knownHelpers={helperMissing:!0,blockHelperMissing:!0,each:!0,if:!0,unless:!0,with:!0,log:!0,lookup:!0},n)for(var o in n)o in n&&(e.knownHelpers[o]=n[o]);return this.accept(t)},compileProgram:function(t){var e=new this.compiler,n=e.compile(t,this.options),o=this.guid++;return this.usePartial=this.usePartial||n.usePartial,this.children[o]=n,this.useDepths=this.useDepths||n.useDepths,o},accept:function(t){if(!this[t.type])throw new u.default("Unknown type: "+t.type,t);this.sourceNode.unshift(t);var e=this[t.type](t);return this.sourceNode.shift(),e},Program:function(t){this.options.blockParams.unshift(t.blockParams);for(var e=t.body,n=e.length,o=0;n>o;o++)this.accept(e[o]);return this.options.blockParams.shift(),this.isSimple=1===n,this.blockParams=t.blockParams?t.blockParams.length:0,this},BlockStatement:function(t){s(t);var e=t.program,n=t.inverse;e=e&&this.compileProgram(e),n=n&&this.compileProgram(n);var o=this.classifySexpr(t);"helper"===o?this.helperSexpr(t,e,n):"simple"===o?(this.simpleSexpr(t),this.opcode("pushProgram",e),this.opcode("pushProgram",n),this.opcode("emptyHash"),this.opcode("blockValue",t.path.original)):(this.ambiguousSexpr(t,e,n),this.opcode("pushProgram",e),this.opcode("pushProgram",n),this.opcode("emptyHash"),this.opcode("ambiguousBlockValue")),this.opcode("append")},DecoratorBlock:function(t){var e=t.program&&this.compileProgram(t.program),n=this.setupFullMustacheParams(t,e,void 0),o=t.path;this.useDecorators=!0,this.opcode("registerDecorator",n.length,o.original)},PartialStatement:function(t){this.usePartial=!0;var e=t.program;e&&(e=this.compileProgram(t.program));var n=t.params;if(n.length>1)throw new u.default("Unsupported number of partial arguments: "+n.length,t);n.length||(this.options.explicitPartialContext?this.opcode("pushLiteral","undefined"):n.push({type:"PathExpression",parts:[],depth:0}));var o=t.name.original,i="SubExpression"===t.name.type;i&&this.accept(t.name),this.setupFullMustacheParams(t,e,void 0,!0);var r=t.indent||"";this.options.preventIndent&&r&&(this.opcode("appendContent",r),r=""),this.opcode("invokePartial",i,o,r),this.opcode("append")},PartialBlockStatement:function(t){this.PartialStatement(t)},MustacheStatement:function(t){this.SubExpression(t),t.escaped&&!this.options.noEscape?this.opcode("appendEscaped"):this.opcode("append")},Decorator:function(t){this.DecoratorBlock(t)},ContentStatement:function(t){t.value&&this.opcode("appendContent",t.value)},CommentStatement:function(){},SubExpression:function(t){s(t);var e=this.classifySexpr(t);"simple"===e?this.simpleSexpr(t):"helper"===e?this.helperSexpr(t):this.ambiguousSexpr(t)},ambiguousSexpr:function(t,e,n){var o=t.path,i=o.parts[0],r=null!=e||null!=n;this.opcode("getContext",o.depth),this.opcode("pushProgram",e),this.opcode("pushProgram",n),o.strict=!0,this.accept(o),this.opcode("invokeAmbiguous",i,r)},simpleSexpr:function(t){var e=t.path;e.strict=!0,this.accept(e),this.opcode("resolvePossibleLambda")},helperSexpr:function(t,e,n){var o=this.setupFullMustacheParams(t,e,n),i=t.path,r=i.parts[0];if(this.options.knownHelpers[r])this.opcode("invokeKnownHelper",o.length,r);else{if(this.options.knownHelpersOnly)throw new u.default("You specified knownHelpersOnly, but used the unknown helper "+r,t);i.strict=!0,i.falsy=!0,this.accept(i),this.opcode("invokeHelper",o.length,i.original,h.default.helpers.simpleId(i))}},PathExpression:function(t){this.addDepth(t.depth),this.opcode("getContext",t.depth);var e=t.parts[0],n=h.default.helpers.scopedId(t),o=!t.depth&&!n&&this.blockParamIndex(e);o?this.opcode("lookupBlockParam",o,t.parts):e?t.data?(this.options.data=!0,this.opcode("lookupData",t.depth,t.parts,t.strict)):this.opcode("lookupOnContext",t.parts,t.falsy,t.strict,n):this.opcode("pushContext")},StringLiteral:function(t){this.opcode("pushString",t.value)},NumberLiteral:function(t){this.opcode("pushLiteral",t.value)},BooleanLiteral:function(t){this.opcode("pushLiteral",t.value)},UndefinedLiteral:function(){this.opcode("pushLiteral","undefined")},NullLiteral:function(){this.opcode("pushLiteral","null")},Hash:function(t){var e=t.pairs,n=0,o=e.length;for(this.opcode("pushHash");o>n;n++)this.pushParam(e[n].value);for(;n--;)this.opcode("assignToHash",e[n].key);this.opcode("popHash")},opcode:function(t){this.opcodes.push({opcode:t,args:f.call(arguments,1),loc:this.sourceNode[0].loc})},addDepth:function(t){t&&(this.useDepths=!0)},classifySexpr:function(t){var e=h.default.helpers.simpleId(t.path),n=e&&!!this.blockParamIndex(t.path.parts[0]),o=!n&&h.default.helpers.helperExpression(t),i=!n&&(o||e);if(i&&!o){var r=t.path.parts[0],a=this.options;a.knownHelpers[r]?o=!0:a.knownHelpersOnly&&(i=!1)}return o?"helper":i?"ambiguous":"simple"},pushParams:function(t){for(var e=0,n=t.length;n>e;e++)this.pushParam(t[e])},pushParam:function(t){var e=null!=t.value?t.value:t.original||"";if(this.stringParams)e.replace&&(e=e.replace(/^(\.?\.\/)*/g,"").replace(/\//g,".")),t.depth&&this.addDepth(t.depth),this.opcode("getContext",t.depth||0),this.opcode("pushStringParam",e,t.type),"SubExpression"===t.type&&this.accept(t);else{if(this.trackIds){var n=void 0;if(!t.parts||h.default.helpers.scopedId(t)||t.depth||(n=this.blockParamIndex(t.parts[0])),n){var o=t.parts.slice(1).join(".");this.opcode("pushId","BlockParam",n,o)}else e=t.original||e,e.replace&&(e=e.replace(/^this(?:\.|$)/,"").replace(/^\.\//,"").replace(/^\.$/,"")),this.opcode("pushId",t.type,e)}this.accept(t)}},setupFullMustacheParams:function(t,e,n,o){var i=t.params;return this.pushParams(i),this.opcode("pushProgram",e),this.opcode("pushProgram",n),t.hash?this.accept(t.hash):this.opcode("emptyHash",o),i},blockParamIndex:function(t){for(var e=0,n=this.options.blockParams.length;n>e;e++){var o=this.options.blockParams[e],i=o&&p.indexOf(o,t);if(o&&i>=0)return[e,i]}}}},function(t,e,n){"use strict";function o(t){this.value=t}function i(){}function r(t,e,n,o){var i=e.popStack(),r=0,a=n.length;for(t&&a--;a>r;r++)i=e.nameLookup(i,n[r],o);return t?[e.aliasable("container.strict"),"(",i,", ",e.quotedString(n[r]),")"]:i}var a=n(8).default;e.__esModule=!0;var s=n(10),l=n(12),c=a(l),u=n(13),p=n(18),d=a(p);i.prototype={nameLookup:function(t,e){return i.isValidJavaScriptVariableName(e)?[t,".",e]:[t,"[",JSON.stringify(e),"]"]},depthedLookup:function(t){return[this.aliasable("container.lookup"),'(depths, "',t,'")']},compilerInfo:function(){var t=s.COMPILER_REVISION,e=s.REVISION_CHANGES[t];return[t,e]},appendToBuffer:function(t,e,n){return u.isArray(t)||(t=[t]),t=this.source.wrap(t,e),this.environment.isSimple?["return ",t,";"]:n?["buffer += ",t,";"]:(t.appendToBuffer=!0,t)},initializeBuffer:function(){return this.quotedString("")},compile:function(t,e,n,o){this.environment=t,this.options=e,this.stringParams=this.options.stringParams,this.trackIds=this.options.trackIds,this.precompile=!o,this.name=this.environment.name,this.isChild=!!n,this.context=n||{decorators:[],programs:[],environments:[]},this.preamble(),this.stackSlot=0,this.stackVars=[],this.aliases={},this.registers={list:[]},this.hashes=[],this.compileStack=[],this.inlineStack=[],this.blockParams=[],this.compileChildren(t,e),this.useDepths=this.useDepths||t.useDepths||t.useDecorators||this.options.compat,this.useBlockParams=this.useBlockParams||t.useBlockParams;var i=t.opcodes,r=void 0,a=void 0,s=void 0,l=void 0;for(s=0,l=i.length;l>s;s++)r=i[s],this.source.currentLocation=r.loc,a=a||r.loc,this[r.opcode].apply(this,r.args);if(this.source.currentLocation=a,this.pushSource(""),this.stackSlot||this.inlineStack.length||this.compileStack.length)throw new c.default("Compile completed with content left on stack");this.decorators.isEmpty()?this.decorators=void 0:(this.useDecorators=!0,this.decorators.prepend("var decorators = container.decorators;\n"),this.decorators.push("return fn;"),o?this.decorators=Function.apply(this,["fn","props","container","depth0","data","blockParams","depths",this.decorators.merge()]):(this.decorators.prepend("function(fn, props, container, depth0, data, blockParams, depths) {\n"),this.decorators.push("}\n"),this.decorators=this.decorators.merge()));var u=this.createFunctionContext(o);if(this.isChild)return u;var p={compiler:this.compilerInfo(),main:u};this.decorators&&(p.main_d=this.decorators,p.useDecorators=!0);var d=this.context,h=d.programs,f=d.decorators;for(s=0,l=h.length;l>s;s++)h[s]&&(p[s]=h[s],f[s]&&(p[s+"_d"]=f[s],p.useDecorators=!0));return this.environment.usePartial&&(p.usePartial=!0),this.options.data&&(p.useData=!0),this.useDepths&&(p.useDepths=!0),this.useBlockParams&&(p.useBlockParams=!0),this.options.compat&&(p.compat=!0),o?p.compilerOptions=this.options:(p.compiler=JSON.stringify(p.compiler),this.source.currentLocation={start:{line:1,column:0}},p=this.objectLiteral(p),e.srcName?(p=p.toStringWithSourceMap({file:e.destName}),p.map=p.map&&p.map.toString()):p=p.toString()),p},preamble:function(){this.lastContext=0,this.source=new d.default(this.options.srcName),this.decorators=new d.default(this.options.srcName)},createFunctionContext:function(t){var e="",n=this.stackVars.concat(this.registers.list);n.length>0&&(e+=", "+n.join(", "));var o=0;for(var i in this.aliases){var r=this.aliases[i];this.aliases.hasOwnProperty(i)&&r.children&&r.referenceCount>1&&(e+=", alias"+ ++o+"="+i,r.children[0]="alias"+o)}var a=["container","depth0","helpers","partials","data"];(this.useBlockParams||this.useDepths)&&a.push("blockParams"),this.useDepths&&a.push("depths");var s=this.mergeSource(e);return t?(a.push(s),Function.apply(this,a)):this.source.wrap(["function(",a.join(","),") {\n ",s,"}"])},mergeSource:function(t){var e=this.environment.isSimple,n=!this.forceBuffer,o=void 0,i=void 0,r=void 0,a=void 0;return this.source.each(function(t){t.appendToBuffer?(r?t.prepend(" + "):r=t,a=t):(r&&(i?r.prepend("buffer += "):o=!0,a.add(";"),r=a=void 0),i=!0,e||(n=!1))}),n?r?(r.prepend("return "),a.add(";")):i||this.source.push('return "";'):(t+=", buffer = "+(o?"":this.initializeBuffer()),r?(r.prepend("return buffer + "),a.add(";")):this.source.push("return buffer;")),t&&this.source.prepend("var "+t.substring(2)+(o?"":";\n")),this.source.merge()},blockValue:function(t){var e=this.aliasable("helpers.blockHelperMissing"),n=[this.contextName(0)];this.setupHelperArgs(t,0,n);var o=this.popStack();n.splice(1,0,o),this.push(this.source.functionCall(e,"call",n))},ambiguousBlockValue:function(){var t=this.aliasable("helpers.blockHelperMissing"),e=[this.contextName(0)];this.setupHelperArgs("",0,e,!0),this.flushInline();var n=this.topStack();e.splice(1,0,n),this.pushSource(["if (!",this.lastHelper,") { ",n," = ",this.source.functionCall(t,"call",e),"}"])},appendContent:function(t){this.pendingContent?t=this.pendingContent+t:this.pendingLocation=this.source.currentLocation,this.pendingContent=t},append:function(){if(this.isInline())this.replaceStack(function(t){return[" != null ? ",t,' : ""']}),this.pushSource(this.appendToBuffer(this.popStack()));else{var t=this.popStack();this.pushSource(["if (",t," != null) { ",this.appendToBuffer(t,void 0,!0)," }"]),this.environment.isSimple&&this.pushSource(["else { ",this.appendToBuffer("''",void 0,!0)," }"])}},appendEscaped:function(){this.pushSource(this.appendToBuffer([this.aliasable("container.escapeExpression"),"(",this.popStack(),")"]))},getContext:function(t){this.lastContext=t},pushContext:function(){this.pushStackLiteral(this.contextName(this.lastContext))},lookupOnContext:function(t,e,n,o){var i=0;o||!this.options.compat||this.lastContext?this.pushContext():this.push(this.depthedLookup(t[i++])),this.resolvePath("context",t,i,e,n)},lookupBlockParam:function(t,e){this.useBlockParams=!0,this.push(["blockParams[",t[0],"][",t[1],"]"]),this.resolvePath("context",e,1)},lookupData:function(t,e,n){t?this.pushStackLiteral("container.data(data, "+t+")"):this.pushStackLiteral("data"),this.resolvePath("data",e,0,!0,n)},resolvePath:function(t,e,n,o,i){var a=this;if(this.options.strict||this.options.assumeObjects)return void this.push(r(this.options.strict&&i,this,e,t));for(var s=e.length;s>n;n++)this.replaceStack(function(i){var r=a.nameLookup(i,e[n],t);return o?[" && ",r]:[" != null ? ",r," : ",i]})},resolvePossibleLambda:function(){this.push([this.aliasable("container.lambda"),"(",this.popStack(),", ",this.contextName(0),")"])},pushStringParam:function(t,e){this.pushContext(),this.pushString(e),"SubExpression"!==e&&("string"==typeof t?this.pushString(t):this.pushStackLiteral(t))},emptyHash:function(t){this.trackIds&&this.push("{}"),this.stringParams&&(this.push("{}"),this.push("{}")),this.pushStackLiteral(t?"undefined":"{}")},pushHash:function(){this.hash&&this.hashes.push(this.hash),this.hash={values:[],types:[],contexts:[],ids:[]}},popHash:function(){var t=this.hash;this.hash=this.hashes.pop(),this.trackIds&&this.push(this.objectLiteral(t.ids)),this.stringParams&&(this.push(this.objectLiteral(t.contexts)),this.push(this.objectLiteral(t.types))),this.push(this.objectLiteral(t.values))},pushString:function(t){this.pushStackLiteral(this.quotedString(t))},pushLiteral:function(t){this.pushStackLiteral(t)},pushProgram:function(t){null!=t?this.pushStackLiteral(this.programExpression(t)):this.pushStackLiteral(null)},registerDecorator:function(t,e){var n=this.nameLookup("decorators",e,"decorator"),o=this.setupHelperArgs(e,t);this.decorators.push(["fn = ",this.decorators.functionCall(n,"",["fn","props","container",o])," || fn;"])},invokeHelper:function(t,e,n){var o=this.popStack(),i=this.setupHelper(t,e),r=n?[i.name," || "]:"",a=["("].concat(r,o);this.options.strict||a.push(" || ",this.aliasable("helpers.helperMissing")),a.push(")"),this.push(this.source.functionCall(a,"call",i.callParams))},invokeKnownHelper:function(t,e){var n=this.setupHelper(t,e);this.push(this.source.functionCall(n.name,"call",n.callParams))},invokeAmbiguous:function(t,e){this.useRegister("helper");var n=this.popStack();this.emptyHash();var o=this.setupHelper(0,t,e),i=this.lastHelper=this.nameLookup("helpers",t,"helper"),r=["(","(helper = ",i," || ",n,")"];this.options.strict||(r[0]="(helper = ",r.push(" != null ? helper : ",this.aliasable("helpers.helperMissing"))),this.push(["(",r,o.paramsInit?["),(",o.paramsInit]:[],"),","(typeof helper === ",this.aliasable('"function"')," ? ",this.source.functionCall("helper","call",o.callParams)," : helper))"])},invokePartial:function(t,e,n){var o=[],i=this.setupParams(e,1,o);t&&(e=this.popStack(),delete i.name),n&&(i.indent=JSON.stringify(n)),i.helpers="helpers",i.partials="partials",t?o.unshift(e):o.unshift(this.nameLookup("partials",e,"partial")),this.options.compat&&(i.depths="depths"),i=this.objectLiteral(i),o.push(i),this.push(this.source.functionCall("container.invokePartial","",o))},assignToHash:function(t){var e=this.popStack(),n=void 0,o=void 0,i=void 0;this.trackIds&&(i=this.popStack()),this.stringParams&&(o=this.popStack(),n=this.popStack());var r=this.hash;n&&(r.contexts[t]=n),o&&(r.types[t]=o),i&&(r.ids[t]=i),r.values[t]=e},pushId:function(t,e,n){"BlockParam"===t?this.pushStackLiteral("blockParams["+e[0]+"].path["+e[1]+"]"+(n?" + "+JSON.stringify("."+n):"")):"PathExpression"===t?this.pushString(e):"SubExpression"===t?this.pushStackLiteral("true"):this.pushStackLiteral("null")},compiler:i,compileChildren:function(t,e){for(var n=t.children,o=void 0,i=void 0,r=0,a=n.length;a>r;r++){o=n[r],i=new this.compiler;var s=this.matchExistingProgram(o);null==s?(this.context.programs.push(""),s=this.context.programs.length,o.index=s,o.name="program"+s,this.context.programs[s]=i.compile(o,e,this.context,!this.precompile),this.context.decorators[s]=i.decorators,this.context.environments[s]=o,this.useDepths=this.useDepths||i.useDepths,this.useBlockParams=this.useBlockParams||i.useBlockParams):(o.index=s,o.name="program"+s,this.useDepths=this.useDepths||o.useDepths,this.useBlockParams=this.useBlockParams||o.useBlockParams)}},matchExistingProgram:function(t){for(var e=0,n=this.context.environments.length;n>e;e++){var o=this.context.environments[e];if(o&&o.equals(t))return e}},programExpression:function(t){var e=this.environment.children[t],n=[e.index,"data",e.blockParams];return(this.useBlockParams||this.useDepths)&&n.push("blockParams"),this.useDepths&&n.push("depths"),"container.program("+n.join(", ")+")"},useRegister:function(t){this.registers[t]||(this.registers[t]=!0,this.registers.list.push(t))},push:function(t){return t instanceof o||(t=this.source.wrap(t)),this.inlineStack.push(t),t},pushStackLiteral:function(t){this.push(new o(t))},pushSource:function(t){this.pendingContent&&(this.source.push(this.appendToBuffer(this.source.quotedString(this.pendingContent),this.pendingLocation)),this.pendingContent=void 0),t&&this.source.push(t)},replaceStack:function(t){var e=["("],n=void 0,i=void 0,r=void 0;if(!this.isInline())throw new c.default("replaceStack on non-inline");var a=this.popStack(!0);if(a instanceof o)n=[a.value],e=["(",n],r=!0;else{i=!0;var s=this.incrStack();e=["((",this.push(s)," = ",a,")"],n=this.topStack()}var l=t.call(this,n);r||this.popStack(),i&&this.stackSlot--,this.push(e.concat(l,")"))},incrStack:function(){return this.stackSlot++,this.stackSlot>this.stackVars.length&&this.stackVars.push("stack"+this.stackSlot),this.topStackName()},topStackName:function(){return"stack"+this.stackSlot},flushInline:function(){var t=this.inlineStack;this.inlineStack=[];for(var e=0,n=t.length;n>e;e++){var i=t[e];if(i instanceof o)this.compileStack.push(i);else{var r=this.incrStack();this.pushSource([r," = ",i,";"]),this.compileStack.push(r)}}},isInline:function(){return this.inlineStack.length},popStack:function(t){var e=this.isInline(),n=(e?this.inlineStack:this.compileStack).pop();if(!t&&n instanceof o)return n.value;if(!e){if(!this.stackSlot)throw new c.default("Invalid stack pop");this.stackSlot--}return n},topStack:function(){var t=this.isInline()?this.inlineStack:this.compileStack,e=t[t.length-1];return e instanceof o?e.value:e},contextName:function(t){return this.useDepths&&t?"depths["+t+"]":"depth"+t},quotedString:function(t){return this.source.quotedString(t)},objectLiteral:function(t){return this.source.objectLiteral(t)},aliasable:function(t){var e=this.aliases[t];return e?(e.referenceCount++,e):(e=this.aliases[t]=this.source.wrap(t),e.aliasable=!0,e.referenceCount=1,e)},setupHelper:function(t,e,n){var o=[],i=this.setupHelperArgs(e,t,o,n),r=this.nameLookup("helpers",e,"helper");return{params:o,paramsInit:i,name:r,callParams:[this.contextName(0)].concat(o)}},setupParams:function(t,e,n){var o={},i=[],r=[],a=[],s=!n,l=void 0;s&&(n=[]),o.name=this.quotedString(t),o.hash=this.popStack(),this.trackIds&&(o.hashIds=this.popStack()),this.stringParams&&(o.hashTypes=this.popStack(),o.hashContexts=this.popStack());var c=this.popStack(),u=this.popStack();(u||c)&&(o.fn=u||"container.noop",o.inverse=c||"container.noop");for(var p=e;p--;)l=this.popStack(),n[p]=l,this.trackIds&&(a[p]=this.popStack()),this.stringParams&&(r[p]=this.popStack(),i[p]=this.popStack());return s&&(o.args=this.source.generateArray(n)),this.trackIds&&(o.ids=this.source.generateArray(a)),this.stringParams&&(o.types=this.source.generateArray(r),o.contexts=this.source.generateArray(i)),this.options.data&&(o.data="data"),this.useBlockParams&&(o.blockParams="blockParams"),o},setupHelperArgs:function(t,e,n,o){var i=this.setupParams(t,e,n);return i=this.objectLiteral(i),o?(this.useRegister("options"),n.push("options"),["options=",i]):n?(n.push(i),""):i}},function(){for(var t="break else new var case finally return void catch for switch while continue function this with default if throw delete in try do instanceof typeof abstract enum int short boolean export interface static byte extends long super char final native synchronized class float package throws const goto private transient debugger implements protected volatile double import public let yield await null true false".split(" "),e=i.RESERVED_WORDS={},n=0,o=t.length;o>n;n++)e[t[n]]=!0}(),i.isValidJavaScriptVariableName=function(t){return!i.RESERVED_WORDS[t]&&/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(t)},e.default=i,t.exports=e.default},function(t,e,n){"use strict";function o(){this.parents=[]}function i(t){this.acceptRequired(t,"path"),this.acceptArray(t.params),this.acceptKey(t,"hash")}function r(t){i.call(this,t),this.acceptKey(t,"program"),this.acceptKey(t,"inverse")}function a(t){this.acceptRequired(t,"name"),this.acceptArray(t.params),this.acceptKey(t,"hash")}var s=n(8).default;e.__esModule=!0;var l=n(12),c=s(l);o.prototype={constructor:o,mutating:!1,acceptKey:function(t,e){var n=this.accept(t[e]);if(this.mutating){if(n&&!o.prototype[n.type])throw new c.default('Unexpected node type "'+n.type+'" found when accepting '+e+" on "+t.type); t[e]=n}},acceptRequired:function(t,e){if(this.acceptKey(t,e),!t[e])throw new c.default(t.type+" requires "+e)},acceptArray:function(t){for(var e=0,n=t.length;n>e;e++)this.acceptKey(t,e),t[e]||(t.splice(e,1),e--,n--)},accept:function(t){if(t){if(!this[t.type])throw new c.default("Unknown type: "+t.type,t);this.current&&this.parents.unshift(this.current),this.current=t;var e=this[t.type](t);return this.current=this.parents.shift(),!this.mutating||e?e:e!==!1?t:void 0}},Program:function(t){this.acceptArray(t.body)},MustacheStatement:i,Decorator:i,BlockStatement:r,DecoratorBlock:r,PartialStatement:a,PartialBlockStatement:function(t){a.call(this,t),this.acceptKey(t,"program")},ContentStatement:function(){},CommentStatement:function(){},SubExpression:i,PathExpression:function(){},StringLiteral:function(){},NumberLiteral:function(){},BooleanLiteral:function(){},UndefinedLiteral:function(){},NullLiteral:function(){},Hash:function(t){this.acceptArray(t.pairs)},HashPair:function(t){this.acceptRequired(t,"value")}},e.default=o,t.exports=e.default},function(t,e,n){(function(n){"use strict";e.__esModule=!0,e.default=function(t){var e="undefined"!=typeof n?n:window,o=e.Handlebars;t.noConflict=function(){e.Handlebars===t&&(e.Handlebars=o)}},t.exports=e.default}).call(e,function(){return this}())},function(t,e,n){"use strict";e.default=function(t){return t&&t.__esModule?t:{default:t}},e.__esModule=!0},function(t,e,n){"use strict";e.default=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e},e.__esModule=!0},function(t,e,n){"use strict";function o(t,e,n){this.helpers=t||{},this.partials=e||{},this.decorators=n||{},l.registerDefaultHelpers(this),c.registerDefaultDecorators(this)}var i=n(8).default;e.__esModule=!0,e.HandlebarsEnvironment=o;var r=n(13),a=n(12),s=i(a),l=n(19),c=n(20),u=n(21),p=i(u),d="4.0.0";e.VERSION=d;var h=7;e.COMPILER_REVISION=h;var f={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:"== 1.x.x",5:"== 2.0.0-alpha.x",6:">= 2.0.0-beta.1",7:">= 4.0.0"};e.REVISION_CHANGES=f;var m="[object Object]";o.prototype={constructor:o,logger:p.default,log:p.default.log,registerHelper:function(t,e){if(r.toString.call(t)===m){if(e)throw new s.default("Arg not supported with multiple helpers");r.extend(this.helpers,t)}else this.helpers[t]=e},unregisterHelper:function(t){delete this.helpers[t]},registerPartial:function(t,e){if(r.toString.call(t)===m)r.extend(this.partials,t);else{if("undefined"==typeof e)throw new s.default("Attempting to register a partial as undefined");this.partials[t]=e}},unregisterPartial:function(t){delete this.partials[t]},registerDecorator:function(t,e){if(r.toString.call(t)===m){if(e)throw new s.default("Arg not supported with multiple decorators");r.extend(this.decorators,t)}else this.decorators[t]=e},unregisterDecorator:function(t){delete this.decorators[t]}};var g=p.default.log;e.log=g,e.createFrame=r.createFrame,e.logger=p.default},function(t,e,n){"use strict";function o(t){this.string=t}e.__esModule=!0,o.prototype.toString=o.prototype.toHTML=function(){return""+this.string},e.default=o,t.exports=e.default},function(t,e,n){"use strict";function o(t,e){var n=e&&e.loc,r=void 0,a=void 0;n&&(r=n.start.line,a=n.start.column,t+=" - "+r+":"+a);for(var s=Error.prototype.constructor.call(this,t),l=0;l n;n++)if(t[n]===e)return n;return-1}function a(t){if("string"!=typeof t){if(t&&t.toHTML)return t.toHTML();if(null==t)return"";if(!t)return t+"";t=""+t}return h.test(t)?t.replace(d,o):t}function s(t){return!t&&0!==t||!(!g(t)||0!==t.length)}function l(t){var e=i({},t);return e._parent=t,e}function c(t,e){return t.path=e,t}function u(t,e){return(t?t+".":"")+e}e.__esModule=!0,e.extend=i,e.indexOf=r,e.escapeExpression=a,e.isEmpty=s,e.createFrame=l,e.blockParams=c,e.appendContextPath=u;var p={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`","=":"="},d=/[&<>"'`=]/g,h=/[&<>"'`=]/,f=Object.prototype.toString;e.toString=f;var m=function(t){return"function"==typeof t};m(/x/)&&(e.isFunction=m=function(t){return"function"==typeof t&&"[object Function]"===f.call(t)}),e.isFunction=m;var g=Array.isArray||function(t){return!(!t||"object"!=typeof t)&&"[object Array]"===f.call(t)};e.isArray=g},function(t,e,n){"use strict";function o(t){var e=t&&t[0]||1,n=v.COMPILER_REVISION;if(e!==n){if(n>e){var o=v.REVISION_CHANGES[n],i=v.REVISION_CHANGES[e];throw new g.default("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+o+") or downgrade your runtime to an older version ("+i+").")}throw new g.default("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+t[1]+").")}}function i(t,e){function n(n,o,i){i.hash&&(o=f.extend({},o,i.hash),i.ids&&(i.ids[0]=!0)),n=e.VM.resolvePartial.call(this,n,o,i);var r=e.VM.invokePartial.call(this,n,o,i);if(null==r&&e.compile&&(i.partials[i.name]=e.compile(n,t.compilerOptions,e),r=i.partials[i.name](o,i)),null!=r){if(i.indent){for(var a=r.split("\n"),s=0,l=a.length;l>s&&(a[s]||s+1!==l);s++)a[s]=i.indent+a[s];r=a.join("\n")}return r}throw new g.default("The partial "+i.name+" could not be compiled when running in runtime-only mode")}function o(e){function n(e){return""+t.main(i,e,i.helpers,i.partials,a,l,s)}var r=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],a=r.data;o._setup(r),!r.partial&&t.useData&&(a=c(e,a));var s=void 0,l=t.useBlockParams?[]:void 0;return t.useDepths&&(s=r.depths?e!==r.depths[0]?[e].concat(r.depths):r.depths:[e]),(n=u(t.main,n,i,r.depths||[],a,l))(e,r)}if(!e)throw new g.default("No environment passed to template");if(!t||!t.main)throw new g.default("Unknown template object: "+typeof t);t.main.decorator=t.main_d,e.VM.checkRevision(t.compiler);var i={strict:function(t,e){if(!(e in t))throw new g.default('"'+e+'" not defined in '+t);return t[e]},lookup:function(t,e){for(var n=t.length,o=0;n>o;o++)if(t[o]&&null!=t[o][e])return t[o][e]},lambda:function(t,e){return"function"==typeof t?t.call(e):t},escapeExpression:f.escapeExpression,invokePartial:n,fn:function(e){var n=t[e];return n.decorator=t[e+"_d"],n},programs:[],program:function(t,e,n,o,i){var a=this.programs[t],s=this.fn(t);return e||i||o||n?a=r(this,t,s,e,n,o,i):a||(a=this.programs[t]=r(this,t,s)),a},data:function(t,e){for(;t&&e--;)t=t._parent;return t},merge:function(t,e){var n=t||e;return t&&e&&t!==e&&(n=f.extend({},e,t)),n},noop:e.VM.noop,compilerInfo:t.compiler};return o.isTop=!0,o._setup=function(n){n.partial?(i.helpers=n.helpers,i.partials=n.partials,i.decorators=n.decorators):(i.helpers=i.merge(n.helpers,e.helpers),t.usePartial&&(i.partials=i.merge(n.partials,e.partials)),t.useDecorators&&(i.decorators=i.merge(n.decorators,e.decorators)))},o._child=function(e,n,o,a){if(t.useBlockParams&&!o)throw new g.default("must pass block params");if(t.useDepths&&!a)throw new g.default("must pass parent depths");return r(i,e,t[e],n,0,o,a)},o}function r(t,e,n,o,i,r,a){function s(e){var i=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],s=a;return a&&e!==a[0]&&(s=[e].concat(a)),n(t,e,t.helpers,t.partials,i.data||o,r&&[i.blockParams].concat(r),s)}return s=u(n,s,t,a,o,r),s.program=e,s.depth=a?a.length:0,s.blockParams=i||0,s}function a(t,e,n){return t?t.call||n.name||(n.name=t,t=n.partials[t]):t="@partial-block"===n.name?n.data["partial-block"]:n.partials[n.name],t}function s(t,e,n){n.partial=!0,n.ids&&(n.data.contextPath=n.ids[0]||n.data.contextPath);var o=void 0;if(n.fn&&n.fn!==l&&(o=n.data["partial-block"]=n.fn,o.partials&&(n.partials=f.extend({},n.partials,o.partials))),void 0===t&&o&&(t=o),void 0===t)throw new g.default("The partial "+n.name+" could not be found");return t instanceof Function?t(e,n):void 0}function l(){return""}function c(t,e){return e&&"root"in e||(e=e?v.createFrame(e):{},e.root=t),e}function u(t,e,n,o,i,r){if(t.decorator){var a={};e=t.decorator(e,a,n,o&&o[0],i,r,o),f.extend(e,a)}return e}var p=n(9).default,d=n(8).default;e.__esModule=!0,e.checkRevision=o,e.template=i,e.wrapProgram=r,e.resolvePartial=a,e.invokePartial=s,e.noop=l;var h=n(13),f=p(h),m=n(12),g=d(m),v=n(10)},function(t,e,n){"use strict";var o=function(){function t(){this.yy={}}var e={trace:function(){},yy:{},symbols_:{error:2,root:3,program:4,EOF:5,program_repetition0:6,statement:7,mustache:8,block:9,rawBlock:10,partial:11,partialBlock:12,content:13,COMMENT:14,CONTENT:15,openRawBlock:16,rawBlock_repetition_plus0:17,END_RAW_BLOCK:18,OPEN_RAW_BLOCK:19,helperName:20,openRawBlock_repetition0:21,openRawBlock_option0:22,CLOSE_RAW_BLOCK:23,openBlock:24,block_option0:25,closeBlock:26,openInverse:27,block_option1:28,OPEN_BLOCK:29,openBlock_repetition0:30,openBlock_option0:31,openBlock_option1:32,CLOSE:33,OPEN_INVERSE:34,openInverse_repetition0:35,openInverse_option0:36,openInverse_option1:37,openInverseChain:38,OPEN_INVERSE_CHAIN:39,openInverseChain_repetition0:40,openInverseChain_option0:41,openInverseChain_option1:42,inverseAndProgram:43,INVERSE:44,inverseChain:45,inverseChain_option0:46,OPEN_ENDBLOCK:47,OPEN:48,mustache_repetition0:49,mustache_option0:50,OPEN_UNESCAPED:51,mustache_repetition1:52,mustache_option1:53,CLOSE_UNESCAPED:54,OPEN_PARTIAL:55,partialName:56,partial_repetition0:57,partial_option0:58,openPartialBlock:59,OPEN_PARTIAL_BLOCK:60,openPartialBlock_repetition0:61,openPartialBlock_option0:62,param:63,sexpr:64,OPEN_SEXPR:65,sexpr_repetition0:66,sexpr_option0:67,CLOSE_SEXPR:68,hash:69,hash_repetition_plus0:70,hashSegment:71,ID:72,EQUALS:73,blockParams:74,OPEN_BLOCK_PARAMS:75,blockParams_repetition_plus0:76,CLOSE_BLOCK_PARAMS:77,path:78,dataName:79,STRING:80,NUMBER:81,BOOLEAN:82,UNDEFINED:83,NULL:84,DATA:85,pathSegments:86,SEP:87,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",14:"COMMENT",15:"CONTENT",18:"END_RAW_BLOCK",19:"OPEN_RAW_BLOCK",23:"CLOSE_RAW_BLOCK",29:"OPEN_BLOCK",33:"CLOSE",34:"OPEN_INVERSE",39:"OPEN_INVERSE_CHAIN",44:"INVERSE",47:"OPEN_ENDBLOCK",48:"OPEN",51:"OPEN_UNESCAPED",54:"CLOSE_UNESCAPED",55:"OPEN_PARTIAL",60:"OPEN_PARTIAL_BLOCK",65:"OPEN_SEXPR",68:"CLOSE_SEXPR",72:"ID",73:"EQUALS",75:"OPEN_BLOCK_PARAMS",77:"CLOSE_BLOCK_PARAMS",80:"STRING",81:"NUMBER",82:"BOOLEAN",83:"UNDEFINED",84:"NULL",85:"DATA",87:"SEP"},productions_:[0,[3,2],[4,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[13,1],[10,3],[16,5],[9,4],[9,4],[24,6],[27,6],[38,6],[43,2],[45,3],[45,1],[26,3],[8,5],[8,5],[11,5],[12,3],[59,5],[63,1],[63,1],[64,5],[69,1],[71,3],[74,3],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[56,1],[56,1],[79,2],[78,1],[86,3],[86,1],[6,0],[6,2],[17,1],[17,2],[21,0],[21,2],[22,0],[22,1],[25,0],[25,1],[28,0],[28,1],[30,0],[30,2],[31,0],[31,1],[32,0],[32,1],[35,0],[35,2],[36,0],[36,1],[37,0],[37,1],[40,0],[40,2],[41,0],[41,1],[42,0],[42,1],[46,0],[46,1],[49,0],[49,2],[50,0],[50,1],[52,0],[52,2],[53,0],[53,1],[57,0],[57,2],[58,0],[58,1],[61,0],[61,2],[62,0],[62,1],[66,0],[66,2],[67,0],[67,1],[70,1],[70,2],[76,1],[76,2]],performAction:function(t,e,n,o,i,r,a){var s=r.length-1;switch(i){case 1:return r[s-1];case 2:this.$=o.prepareProgram(r[s]);break;case 3:this.$=r[s];break;case 4:this.$=r[s];break;case 5:this.$=r[s];break;case 6:this.$=r[s];break;case 7:this.$=r[s];break;case 8:this.$=r[s];break;case 9:this.$={type:"CommentStatement",value:o.stripComment(r[s]),strip:o.stripFlags(r[s],r[s]),loc:o.locInfo(this._$)};break;case 10:this.$={type:"ContentStatement",original:r[s],value:r[s],loc:o.locInfo(this._$)};break;case 11:this.$=o.prepareRawBlock(r[s-2],r[s-1],r[s],this._$);break;case 12:this.$={path:r[s-3],params:r[s-2],hash:r[s-1]};break;case 13:this.$=o.prepareBlock(r[s-3],r[s-2],r[s-1],r[s],!1,this._$);break;case 14:this.$=o.prepareBlock(r[s-3],r[s-2],r[s-1],r[s],!0,this._$);break;case 15:this.$={open:r[s-5],path:r[s-4],params:r[s-3],hash:r[s-2],blockParams:r[s-1],strip:o.stripFlags(r[s-5],r[s])};break;case 16:this.$={path:r[s-4],params:r[s-3],hash:r[s-2],blockParams:r[s-1],strip:o.stripFlags(r[s-5],r[s])};break;case 17:this.$={path:r[s-4],params:r[s-3],hash:r[s-2],blockParams:r[s-1],strip:o.stripFlags(r[s-5],r[s])};break;case 18:this.$={strip:o.stripFlags(r[s-1],r[s-1]),program:r[s]};break;case 19:var l=o.prepareBlock(r[s-2],r[s-1],r[s],r[s],!1,this._$),c=o.prepareProgram([l],r[s-1].loc);c.chained=!0,this.$={strip:r[s-2].strip,program:c,chain:!0};break;case 20:this.$=r[s];break;case 21:this.$={path:r[s-1],strip:o.stripFlags(r[s-2],r[s])};break;case 22:this.$=o.prepareMustache(r[s-3],r[s-2],r[s-1],r[s-4],o.stripFlags(r[s-4],r[s]),this._$);break;case 23:this.$=o.prepareMustache(r[s-3],r[s-2],r[s-1],r[s-4],o.stripFlags(r[s-4],r[s]),this._$);break;case 24:this.$={type:"PartialStatement",name:r[s-3],params:r[s-2],hash:r[s-1],indent:"",strip:o.stripFlags(r[s-4],r[s]),loc:o.locInfo(this._$)};break;case 25:this.$=o.preparePartialBlock(r[s-2],r[s-1],r[s],this._$);break;case 26:this.$={path:r[s-3],params:r[s-2],hash:r[s-1],strip:o.stripFlags(r[s-4],r[s])};break;case 27:this.$=r[s];break;case 28:this.$=r[s];break;case 29:this.$={type:"SubExpression",path:r[s-3],params:r[s-2],hash:r[s-1],loc:o.locInfo(this._$)};break;case 30:this.$={type:"Hash",pairs:r[s],loc:o.locInfo(this._$)};break;case 31:this.$={type:"HashPair",key:o.id(r[s-2]),value:r[s],loc:o.locInfo(this._$)};break;case 32:this.$=o.id(r[s-1]);break;case 33:this.$=r[s];break;case 34:this.$=r[s];break;case 35:this.$={type:"StringLiteral",value:r[s],original:r[s],loc:o.locInfo(this._$)};break;case 36:this.$={type:"NumberLiteral",value:Number(r[s]),original:Number(r[s]),loc:o.locInfo(this._$)};break;case 37:this.$={type:"BooleanLiteral",value:"true"===r[s],original:"true"===r[s],loc:o.locInfo(this._$)};break;case 38:this.$={type:"UndefinedLiteral",original:void 0,value:void 0,loc:o.locInfo(this._$)};break;case 39:this.$={type:"NullLiteral",original:null,value:null,loc:o.locInfo(this._$)};break;case 40:this.$=r[s];break;case 41:this.$=r[s];break;case 42:this.$=o.preparePath(!0,r[s],this._$);break;case 43:this.$=o.preparePath(!1,r[s],this._$);break;case 44:r[s-2].push({part:o.id(r[s]),original:r[s],separator:r[s-1]}),this.$=r[s-2];break;case 45:this.$=[{part:o.id(r[s]),original:r[s]}];break;case 46:this.$=[];break;case 47:r[s-1].push(r[s]);break;case 48:this.$=[r[s]];break;case 49:r[s-1].push(r[s]);break;case 50:this.$=[];break;case 51:r[s-1].push(r[s]);break;case 58:this.$=[];break;case 59:r[s-1].push(r[s]);break;case 64:this.$=[];break;case 65:r[s-1].push(r[s]);break;case 70:this.$=[];break;case 71:r[s-1].push(r[s]);break;case 78:this.$=[];break;case 79:r[s-1].push(r[s]);break;case 82:this.$=[];break;case 83:r[s-1].push(r[s]);break;case 86:this.$=[];break;case 87:r[s-1].push(r[s]);break;case 90:this.$=[];break;case 91:r[s-1].push(r[s]);break;case 94:this.$=[];break;case 95:r[s-1].push(r[s]);break;case 98:this.$=[r[s]];break;case 99:r[s-1].push(r[s]);break;case 100:this.$=[r[s]];break;case 101:r[s-1].push(r[s])}},table:[{3:1,4:2,5:[2,46],6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{1:[3]},{5:[1,4]},{5:[2,2],7:5,8:6,9:7,10:8,11:9,12:10,13:11,14:[1,12],15:[1,20],16:17,19:[1,23],24:15,27:16,29:[1,21],34:[1,22],39:[2,2],44:[2,2],47:[2,2],48:[1,13],51:[1,14],55:[1,18],59:19,60:[1,24]},{1:[2,1]},{5:[2,47],14:[2,47],15:[2,47],19:[2,47],29:[2,47],34:[2,47],39:[2,47],44:[2,47],47:[2,47],48:[2,47],51:[2,47],55:[2,47],60:[2,47]},{5:[2,3],14:[2,3],15:[2,3],19:[2,3],29:[2,3],34:[2,3],39:[2,3],44:[2,3],47:[2,3],48:[2,3],51:[2,3],55:[2,3],60:[2,3]},{5:[2,4],14:[2,4],15:[2,4],19:[2,4],29:[2,4],34:[2,4],39:[2,4],44:[2,4],47:[2,4],48:[2,4],51:[2,4],55:[2,4],60:[2,4]},{5:[2,5],14:[2,5],15:[2,5],19:[2,5],29:[2,5],34:[2,5],39:[2,5],44:[2,5],47:[2,5],48:[2,5],51:[2,5],55:[2,5],60:[2,5]},{5:[2,6],14:[2,6],15:[2,6],19:[2,6],29:[2,6],34:[2,6],39:[2,6],44:[2,6],47:[2,6],48:[2,6],51:[2,6],55:[2,6],60:[2,6]},{5:[2,7],14:[2,7],15:[2,7],19:[2,7],29:[2,7],34:[2,7],39:[2,7],44:[2,7],47:[2,7],48:[2,7],51:[2,7],55:[2,7],60:[2,7]},{5:[2,8],14:[2,8],15:[2,8],19:[2,8],29:[2,8],34:[2,8],39:[2,8],44:[2,8],47:[2,8],48:[2,8],51:[2,8],55:[2,8],60:[2,8]},{5:[2,9],14:[2,9],15:[2,9],19:[2,9],29:[2,9],34:[2,9],39:[2,9],44:[2,9],47:[2,9],48:[2,9],51:[2,9],55:[2,9],60:[2,9]},{20:25,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:36,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:37,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{4:38,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{13:40,15:[1,20],17:39},{20:42,56:41,64:43,65:[1,44],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:45,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{5:[2,10],14:[2,10],15:[2,10],18:[2,10],19:[2,10],29:[2,10],34:[2,10],39:[2,10],44:[2,10],47:[2,10],48:[2,10],51:[2,10],55:[2,10],60:[2,10]},{20:46,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:47,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:48,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:42,56:49,64:43,65:[1,44],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[2,78],49:50,65:[2,78],72:[2,78],80:[2,78],81:[2,78],82:[2,78],83:[2,78],84:[2,78],85:[2,78]},{23:[2,33],33:[2,33],54:[2,33],65:[2,33],68:[2,33],72:[2,33],75:[2,33],80:[2,33],81:[2,33],82:[2,33],83:[2,33],84:[2,33],85:[2,33]},{23:[2,34],33:[2,34],54:[2,34],65:[2,34],68:[2,34],72:[2,34],75:[2,34],80:[2,34],81:[2,34],82:[2,34],83:[2,34],84:[2,34],85:[2,34]},{23:[2,35],33:[2,35],54:[2,35],65:[2,35],68:[2,35],72:[2,35],75:[2,35],80:[2,35],81:[2,35],82:[2,35],83:[2,35],84:[2,35],85:[2,35]},{23:[2,36],33:[2,36],54:[2,36],65:[2,36],68:[2,36],72:[2,36],75:[2,36],80:[2,36],81:[2,36],82:[2,36],83:[2,36],84:[2,36],85:[2,36]},{23:[2,37],33:[2,37],54:[2,37],65:[2,37],68:[2,37],72:[2,37],75:[2,37],80:[2,37],81:[2,37],82:[2,37],83:[2,37],84:[2,37],85:[2,37]},{23:[2,38],33:[2,38],54:[2,38],65:[2,38],68:[2,38],72:[2,38],75:[2,38],80:[2,38],81:[2,38],82:[2,38],83:[2,38],84:[2,38],85:[2,38]},{23:[2,39],33:[2,39],54:[2,39],65:[2,39],68:[2,39],72:[2,39],75:[2,39],80:[2,39],81:[2,39],82:[2,39],83:[2,39],84:[2,39],85:[2,39]},{23:[2,43],33:[2,43],54:[2,43],65:[2,43],68:[2,43],72:[2,43],75:[2,43],80:[2,43],81:[2,43],82:[2,43],83:[2,43],84:[2,43],85:[2,43],87:[1,51]},{72:[1,35],86:52},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{52:53,54:[2,82],65:[2,82],72:[2,82],80:[2,82],81:[2,82],82:[2,82],83:[2,82],84:[2,82],85:[2,82]},{25:54,38:56,39:[1,58],43:57,44:[1,59],45:55,47:[2,54]},{28:60,43:61,44:[1,59],47:[2,56]},{13:63,15:[1,20],18:[1,62]},{15:[2,48],18:[2,48]},{33:[2,86],57:64,65:[2,86],72:[2,86],80:[2,86],81:[2,86],82:[2,86],83:[2,86],84:[2,86],85:[2,86]},{33:[2,40],65:[2,40],72:[2,40],80:[2,40],81:[2,40],82:[2,40],83:[2,40],84:[2,40],85:[2,40]},{33:[2,41],65:[2,41],72:[2,41],80:[2,41],81:[2,41],82:[2,41],83:[2,41],84:[2,41],85:[2,41]},{20:65,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:66,47:[1,67]},{30:68,33:[2,58],65:[2,58],72:[2,58],75:[2,58],80:[2,58],81:[2,58],82:[2,58],83:[2,58],84:[2,58],85:[2,58]},{33:[2,64],35:69,65:[2,64],72:[2,64],75:[2,64],80:[2,64],81:[2,64],82:[2,64],83:[2,64],84:[2,64],85:[2,64]},{21:70,23:[2,50],65:[2,50],72:[2,50],80:[2,50],81:[2,50],82:[2,50],83:[2,50],84:[2,50],85:[2,50]},{33:[2,90],61:71,65:[2,90],72:[2,90],80:[2,90],81:[2,90],82:[2,90],83:[2,90],84:[2,90],85:[2,90]},{20:75,33:[2,80],50:72,63:73,64:76,65:[1,44],69:74,70:77,71:78,72:[1,79],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{72:[1,80]},{23:[2,42],33:[2,42],54:[2,42],65:[2,42],68:[2,42],72:[2,42],75:[2,42],80:[2,42],81:[2,42],82:[2,42],83:[2,42],84:[2,42],85:[2,42],87:[1,51]},{20:75,53:81,54:[2,84],63:82,64:76,65:[1,44],69:83,70:77,71:78,72:[1,79],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:84,47:[1,67]},{47:[2,55]},{4:85,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{47:[2,20]},{20:86,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:87,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{26:88,47:[1,67]},{47:[2,57]},{5:[2,11],14:[2,11],15:[2,11],19:[2,11],29:[2,11],34:[2,11],39:[2,11],44:[2,11],47:[2,11],48:[2,11],51:[2,11],55:[2,11],60:[2,11]},{15:[2,49],18:[2,49]},{20:75,33:[2,88],58:89,63:90,64:76,65:[1,44],69:91,70:77,71:78,72:[1,79],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{65:[2,94],66:92,68:[2,94],72:[2,94],80:[2,94],81:[2,94],82:[2,94],83:[2,94],84:[2,94],85:[2,94]},{5:[2,25],14:[2,25],15:[2,25],19:[2,25],29:[2,25],34:[2,25],39:[2,25],44:[2,25],47:[2,25],48:[2,25],51:[2,25],55:[2,25],60:[2,25]},{20:93,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:75,31:94,33:[2,60],63:95,64:76,65:[1,44],69:96,70:77,71:78,72:[1,79],75:[2,60],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:75,33:[2,66],36:97,63:98,64:76,65:[1,44],69:99,70:77,71:78,72:[1,79],75:[2,66],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:75,22:100,23:[2,52],63:101,64:76,65:[1,44],69:102,70:77,71:78,72:[1,79],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:75,33:[2,92],62:103,63:104,64:76,65:[1,44],69:105,70:77,71:78,72:[1,79],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,106]},{33:[2,79],65:[2,79],72:[2,79],80:[2,79],81:[2,79],82:[2,79],83:[2,79],84:[2,79],85:[2,79]},{33:[2,81]},{23:[2,27],33:[2,27],54:[2,27],65:[2,27],68:[2,27],72:[2,27],75:[2,27],80:[2,27],81:[2,27],82:[2,27],83:[2,27],84:[2,27],85:[2,27]},{23:[2,28],33:[2,28],54:[2,28],65:[2,28],68:[2,28],72:[2,28],75:[2,28],80:[2,28],81:[2,28],82:[2,28],83:[2,28],84:[2,28],85:[2,28]},{23:[2,30],33:[2,30],54:[2,30],68:[2,30],71:107,72:[1,108],75:[2,30]},{23:[2,98],33:[2,98],54:[2,98],68:[2,98],72:[2,98],75:[2,98]},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],73:[1,109],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{23:[2,44],33:[2,44],54:[2,44],65:[2,44],68:[2,44],72:[2,44],75:[2,44],80:[2,44],81:[2,44],82:[2,44],83:[2,44],84:[2,44],85:[2,44],87:[2,44]},{54:[1,110]},{54:[2,83],65:[2,83],72:[2,83],80:[2,83],81:[2,83],82:[2,83],83:[2,83],84:[2,83],85:[2,83]},{54:[2,85]},{5:[2,13],14:[2,13],15:[2,13],19:[2,13],29:[2,13],34:[2,13],39:[2,13],44:[2,13],47:[2,13],48:[2,13],51:[2,13],55:[2,13],60:[2,13]},{38:56,39:[1,58],43:57,44:[1,59],45:112,46:111,47:[2,76]},{33:[2,70],40:113,65:[2,70],72:[2,70],75:[2,70],80:[2,70],81:[2,70],82:[2,70],83:[2,70],84:[2,70],85:[2,70]},{47:[2,18]},{5:[2,14],14:[2,14],15:[2,14],19:[2,14],29:[2,14],34:[2,14],39:[2,14],44:[2,14],47:[2,14],48:[2,14],51:[2,14],55:[2,14],60:[2,14]},{33:[1,114]},{33:[2,87],65:[2,87],72:[2,87],80:[2,87],81:[2,87],82:[2,87],83:[2,87],84:[2,87],85:[2,87]},{33:[2,89]},{20:75,63:116,64:76,65:[1,44],67:115,68:[2,96],69:117,70:77,71:78,72:[1,79],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,118]},{32:119,33:[2,62],74:120,75:[1,121]},{33:[2,59],65:[2,59],72:[2,59],75:[2,59],80:[2,59],81:[2,59],82:[2,59],83:[2,59],84:[2,59],85:[2,59]},{33:[2,61],75:[2,61]},{33:[2,68],37:122,74:123,75:[1,121]},{33:[2,65],65:[2,65],72:[2,65],75:[2,65],80:[2,65],81:[2,65],82:[2,65],83:[2,65],84:[2,65],85:[2,65]},{33:[2,67],75:[2,67]},{23:[1,124]},{23:[2,51],65:[2,51],72:[2,51],80:[2,51],81:[2,51],82:[2,51],83:[2,51],84:[2,51],85:[2,51]},{23:[2,53]},{33:[1,125]},{33:[2,91],65:[2,91],72:[2,91],80:[2,91],81:[2,91],82:[2,91],83:[2,91],84:[2,91],85:[2,91]},{33:[2,93]},{5:[2,22],14:[2,22],15:[2,22],19:[2,22],29:[2,22],34:[2,22],39:[2,22],44:[2,22],47:[2,22],48:[2,22],51:[2,22],55:[2,22],60:[2,22]},{23:[2,99],33:[2,99],54:[2,99],68:[2,99],72:[2,99],75:[2,99]},{73:[1,109]},{20:75,63:126,64:76,65:[1,44],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,23],14:[2,23],15:[2,23],19:[2,23],29:[2,23],34:[2,23],39:[2,23],44:[2,23],47:[2,23],48:[2,23],51:[2,23],55:[2,23],60:[2,23]},{47:[2,19]},{47:[2,77]},{20:75,33:[2,72],41:127,63:128,64:76,65:[1,44],69:129,70:77,71:78,72:[1,79],75:[2,72],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,24],14:[2,24],15:[2,24],19:[2,24],29:[2,24],34:[2,24],39:[2,24],44:[2,24],47:[2,24],48:[2,24],51:[2,24],55:[2,24],60:[2,24]},{68:[1,130]},{65:[2,95],68:[2,95],72:[2,95],80:[2,95],81:[2,95],82:[2,95],83:[2,95],84:[2,95],85:[2,95]},{68:[2,97]},{5:[2,21],14:[2,21],15:[2,21],19:[2,21],29:[2,21],34:[2,21],39:[2,21],44:[2,21],47:[2,21],48:[2,21],51:[2,21],55:[2,21],60:[2,21]},{33:[1,131]},{33:[2,63]},{72:[1,133],76:132},{33:[1,134]},{33:[2,69]},{15:[2,12]},{14:[2,26],15:[2,26],19:[2,26],29:[2,26],34:[2,26],47:[2,26],48:[2,26],51:[2,26],55:[2,26],60:[2,26]},{23:[2,31],33:[2,31],54:[2,31],68:[2,31],72:[2,31],75:[2,31]},{33:[2,74],42:135,74:136,75:[1,121]},{33:[2,71],65:[2,71],72:[2,71],75:[2,71],80:[2,71],81:[2,71],82:[2,71],83:[2,71],84:[2,71],85:[2,71]},{33:[2,73],75:[2,73]},{23:[2,29],33:[2,29],54:[2,29],65:[2,29],68:[2,29],72:[2,29],75:[2,29],80:[2,29],81:[2,29],82:[2,29],83:[2,29],84:[2,29],85:[2,29]},{14:[2,15],15:[2,15],19:[2,15],29:[2,15],34:[2,15],39:[2,15],44:[2,15],47:[2,15],48:[2,15],51:[2,15],55:[2,15],60:[2,15]},{72:[1,138],77:[1,137]},{72:[2,100],77:[2,100]},{14:[2,16],15:[2,16],19:[2,16],29:[2,16],34:[2,16],44:[2,16],47:[2,16],48:[2,16],51:[2,16],55:[2,16],60:[2,16]},{33:[1,139]},{33:[2,75]},{33:[2,32]},{72:[2,101],77:[2,101]},{14:[2,17],15:[2,17],19:[2,17],29:[2,17],34:[2,17],39:[2,17],44:[2,17],47:[2,17],48:[2,17],51:[2,17],55:[2,17],60:[2,17]}],defaultActions:{4:[2,1],55:[2,55],57:[2,20],61:[2,57],74:[2,81],83:[2,85],87:[2,18],91:[2,89],102:[2,53],105:[2,93],111:[2,19],112:[2,77],117:[2,97],120:[2,63],123:[2,69],124:[2,12],136:[2,75],137:[2,32]},parseError:function(t,e){throw new Error(t)},parse:function(t){function e(){var t;return t=n.lexer.lex()||1,"number"!=typeof t&&(t=n.symbols_[t]||t),t}var n=this,o=[0],i=[null],r=[],a=this.table,s="",l=0,c=0,u=0;this.lexer.setInput(t),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,this.yy.parser=this,"undefined"==typeof this.lexer.yylloc&&(this.lexer.yylloc={});var p=this.lexer.yylloc;r.push(p);var d=this.lexer.options&&this.lexer.options.ranges;"function"==typeof this.yy.parseError&&(this.parseError=this.yy.parseError);for(var h,f,m,g,v,y,b,_,w,k={};;){if(m=o[o.length-1],this.defaultActions[m]?g=this.defaultActions[m]:((null===h||"undefined"==typeof h)&&(h=e()),g=a[m]&&a[m][h]),"undefined"==typeof g||!g.length||!g[0]){var x="";if(!u){w=[];for(y in a[m])this.terminals_[y]&&y>2&&w.push("'"+this.terminals_[y]+"'");x=this.lexer.showPosition?"Parse error on line "+(l+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+w.join(", ")+", got '"+(this.terminals_[h]||h)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==h?"end of input":"'"+(this.terminals_[h]||h)+"'"),this.parseError(x,{text:this.lexer.match,token:this.terminals_[h]||h,line:this.lexer.yylineno,loc:p,expected:w})}}if(g[0]instanceof Array&&g.length>1)throw new Error("Parse Error: multiple actions possible at state: "+m+", token: "+h);switch(g[0]){case 1:o.push(h),i.push(this.lexer.yytext),r.push(this.lexer.yylloc),o.push(g[1]),h=null,f?(h=f,f=null):(c=this.lexer.yyleng,s=this.lexer.yytext,l=this.lexer.yylineno,p=this.lexer.yylloc,u>0&&u--);break;case 2:if(b=this.productions_[g[1]][1],k.$=i[i.length-b],k._$={first_line:r[r.length-(b||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(b||1)].first_column,last_column:r[r.length-1].last_column},d&&(k._$.range=[r[r.length-(b||1)].range[0],r[r.length-1].range[1]]),v=this.performAction.call(k,s,c,l,this.yy,g[1],i,r),"undefined"!=typeof v)return v;b&&(o=o.slice(0,-1*b*2),i=i.slice(0,-1*b),r=r.slice(0,-1*b)),o.push(this.productions_[g[1]][0]),i.push(k.$),r.push(k._$),_=a[o[o.length-2]][o[o.length-1]],o.push(_);break;case 3:return!0}}return!0}},n=function(){var t={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t){return this._input=t,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t;var e=t.match(/(?:\r\n?|\n).*/g);return e?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e-1),this.offset-=e;var o=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===o.length?this.yylloc.first_column:0)+o[o.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this},more:function(){return this._more=!0,this},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var t,e,n,o,i;this._more||(this.yytext="",this.match="");for(var r=this._currentRules(),a=0;a e[0].length)||(e=n,o=a,this.options.flex));a++);return e?(i=e[0].match(/(?:\r\n?|\n).*/g),i&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],t=this.performAction.call(this,this.yy,this,r[o],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),t?t:void 0):""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{ text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return"undefined"!=typeof t?t:this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(t){this.begin(t)}};return t.options={},t.performAction=function(t,e,n,o){function i(t,n){return e.yytext=e.yytext.substr(t,e.yyleng-n)}switch(n){case 0:if("\\\\"===e.yytext.slice(-2)?(i(0,1),this.begin("mu")):"\\"===e.yytext.slice(-1)?(i(0,1),this.begin("emu")):this.begin("mu"),e.yytext)return 15;break;case 1:return 15;case 2:return this.popState(),15;case 3:return this.begin("raw"),15;case 4:return this.popState(),"raw"===this.conditionStack[this.conditionStack.length-1]?15:(e.yytext=e.yytext.substr(5,e.yyleng-9),"END_RAW_BLOCK");case 5:return 15;case 6:return this.popState(),14;case 7:return 65;case 8:return 68;case 9:return 19;case 10:return this.popState(),this.begin("raw"),23;case 11:return 55;case 12:return 60;case 13:return 29;case 14:return 47;case 15:return this.popState(),44;case 16:return this.popState(),44;case 17:return 34;case 18:return 39;case 19:return 51;case 20:return 48;case 21:this.unput(e.yytext),this.popState(),this.begin("com");break;case 22:return this.popState(),14;case 23:return 48;case 24:return 73;case 25:return 72;case 26:return 72;case 27:return 87;case 28:break;case 29:return this.popState(),54;case 30:return this.popState(),33;case 31:return e.yytext=i(1,2).replace(/\\"/g,'"'),80;case 32:return e.yytext=i(1,2).replace(/\\'/g,"'"),80;case 33:return 85;case 34:return 82;case 35:return 82;case 36:return 83;case 37:return 84;case 38:return 81;case 39:return 75;case 40:return 77;case 41:return 72;case 42:return 72;case 43:return"INVALID";case 44:return 5}},t.rules=[/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:\{\{\{\{(?=[^\/]))/,/^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/,/^(?:[^\x00]*?(?=(\{\{\{\{)))/,/^(?:[\s\S]*?--(~)?\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\{\{\{\{)/,/^(?:\}\}\}\})/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#>)/,/^(?:\{\{(~)?#\*?)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^\s*(~)?\}\})/,/^(?:\{\{(~)?\s*else\s*(~)?\}\})/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{(~)?!--)/,/^(?:\{\{(~)?![\s\S]*?\}\})/,/^(?:\{\{(~)?\*?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)|])))/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)])))/,/^(?:false(?=([~}\s)])))/,/^(?:undefined(?=([~}\s)])))/,/^(?:null(?=([~}\s)])))/,/^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/,/^(?:as\s+\|)/,/^(?:\|)/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/,/^(?:\[[^\]]*\])/,/^(?:.)/,/^(?:$)/],t.conditions={mu:{rules:[7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44],inclusive:!1},emu:{rules:[2],inclusive:!1},com:{rules:[6],inclusive:!1},raw:{rules:[3,4,5],inclusive:!1},INITIAL:{rules:[0,1,44],inclusive:!0}},t}();return e.lexer=n,t.prototype=e,e.Parser=t,new t}();e.__esModule=!0,e.default=o},function(t,e,n){"use strict";function o(){var t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];this.options=t}function i(t,e,n){void 0===e&&(e=t.length);var o=t[e-1],i=t[e-2];return o?"ContentStatement"===o.type?(i||!n?/\r?\n\s*?$/:/(^|\r?\n)\s*?$/).test(o.original):void 0:n}function r(t,e,n){void 0===e&&(e=-1);var o=t[e+1],i=t[e+2];return o?"ContentStatement"===o.type?(i||!n?/^\s*?\r?\n/:/^\s*?(\r?\n|$)/).test(o.original):void 0:n}function a(t,e,n){var o=t[null==e?0:e+1];if(o&&"ContentStatement"===o.type&&(n||!o.rightStripped)){var i=o.value;o.value=o.value.replace(n?/^\s+/:/^[ \t]*\r?\n?/,""),o.rightStripped=o.value!==i}}function s(t,e,n){var o=t[null==e?t.length-1:e-1];if(o&&"ContentStatement"===o.type&&(n||!o.leftStripped)){var i=o.value;return o.value=o.value.replace(n?/\s+$/:/[ \t]+$/,""),o.leftStripped=o.value!==i,o.leftStripped}}var l=n(8).default;e.__esModule=!0;var c=n(6),u=l(c);o.prototype=new u.default,o.prototype.Program=function(t){var e=!this.options.ignoreStandalone,n=!this.isRootSeen;this.isRootSeen=!0;for(var o=t.body,l=0,c=o.length;c>l;l++){var u=o[l],p=this.accept(u);if(p){var d=i(o,l,n),h=r(o,l,n),f=p.openStandalone&&d,m=p.closeStandalone&&h,g=p.inlineStandalone&&d&&h;p.close&&a(o,l,!0),p.open&&s(o,l,!0),e&&g&&(a(o,l),s(o,l)&&"PartialStatement"===u.type&&(u.indent=/([ \t]+$)/.exec(o[l-1].original)[1])),e&&f&&(a((u.program||u.inverse).body),s(o,l)),e&&m&&(a(o,l),s((u.inverse||u.program).body))}}return t},o.prototype.BlockStatement=o.prototype.DecoratorBlock=o.prototype.PartialBlockStatement=function(t){this.accept(t.program),this.accept(t.inverse);var e=t.program||t.inverse,n=t.program&&t.inverse,o=n,l=n;if(n&&n.chained)for(o=n.body[0].program;l.chained;)l=l.body[l.body.length-1].program;var c={open:t.openStrip.open,close:t.closeStrip.close,openStandalone:r(e.body),closeStandalone:i((o||e).body)};if(t.openStrip.close&&a(e.body,null,!0),n){var u=t.inverseStrip;u.open&&s(e.body,null,!0),u.close&&a(o.body,null,!0),t.closeStrip.open&&s(l.body,null,!0),!this.options.ignoreStandalone&&i(e.body)&&r(o.body)&&(s(e.body),a(o.body))}else t.closeStrip.open&&s(e.body,null,!0);return c},o.prototype.Decorator=o.prototype.MustacheStatement=function(t){return t.strip},o.prototype.PartialStatement=o.prototype.CommentStatement=function(t){var e=t.strip||{};return{inlineStandalone:!0,open:e.open,close:e.close}},e.default=o,t.exports=e.default},function(t,e,n){"use strict";function o(t,e){if(e=e.path?e.path.original:e,t.path.original!==e){var n={loc:t.path.loc};throw new g.default(t.path.original+" doesn't match "+e,n)}}function i(t,e){this.source=t,this.start={line:e.first_line,column:e.first_column},this.end={line:e.last_line,column:e.last_column}}function r(t){return/^\[.*\]$/.test(t)?t.substr(1,t.length-2):t}function a(t,e){return{open:"~"===t.charAt(2),close:"~"===e.charAt(e.length-3)}}function s(t){return t.replace(/^\{\{~?\!-?-?/,"").replace(/-?-?~?\}\}$/,"")}function l(t,e,n){n=this.locInfo(n);for(var o=t?"@":"",i=[],r=0,a="",s=0,l=e.length;l>s;s++){var c=e[s].part,u=e[s].original!==c;if(o+=(e[s].separator||"")+c,u||".."!==c&&"."!==c&&"this"!==c)i.push(c);else{if(i.length>0)throw new g.default("Invalid path: "+o,{loc:n});".."===c&&(r++,a+="../")}}return{type:"PathExpression",data:t,depth:r,parts:i,original:o,loc:n}}function c(t,e,n,o,i,r){var a=o.charAt(3)||o.charAt(2),s="{"!==a&&"&"!==a,l=/\*/.test(o);return{type:l?"Decorator":"MustacheStatement",path:t,params:e,hash:n,escaped:s,strip:i,loc:this.locInfo(r)}}function u(t,e,n,i){o(t,n),i=this.locInfo(i);var r={type:"Program",body:e,strip:{},loc:i};return{type:"BlockStatement",path:t.path,params:t.params,hash:t.hash,program:r,openStrip:{},inverseStrip:{},closeStrip:{},loc:i}}function p(t,e,n,i,r,a){i&&i.path&&o(t,i);var s=/\*/.test(t.open);e.blockParams=t.blockParams;var l=void 0,c=void 0;if(n){if(s)throw new g.default("Unexpected inverse block on decorator",n);n.chain&&(n.program.body[0].closeStrip=i.strip),c=n.strip,l=n.program}return r&&(r=l,l=e,e=r),{type:s?"DecoratorBlock":"BlockStatement",path:t.path,params:t.params,hash:t.hash,program:e,inverse:l,openStrip:t.strip,inverseStrip:c,closeStrip:i&&i.strip,loc:this.locInfo(a)}}function d(t,e){if(!e&&t.length){var n=t[0].loc,o=t[t.length-1].loc;n&&o&&(e={source:n.source,start:{line:n.start.line,column:n.start.column},end:{line:o.end.line,column:o.end.column}})}return{type:"Program",body:t,strip:{},loc:e}}function h(t,e,n,i){return o(t,n),{type:"PartialBlockStatement",name:t.path,params:t.params,hash:t.hash,program:e,openStrip:t.strip,closeStrip:n&&n.strip,loc:this.locInfo(i)}}var f=n(8).default;e.__esModule=!0,e.SourceLocation=i,e.id=r,e.stripFlags=a,e.stripComment=s,e.preparePath=l,e.prepareMustache=c,e.prepareRawBlock=u,e.prepareBlock=p,e.prepareProgram=d,e.preparePartialBlock=h;var m=n(12),g=f(m)},function(t,e,n){"use strict";function o(t,e,n){if(r.isArray(t)){for(var o=[],i=0,a=t.length;a>i;i++)o.push(e.wrap(t[i],n));return o}return"boolean"==typeof t||"number"==typeof t?t+"":t}function i(t){this.srcFile=t,this.source=[]}e.__esModule=!0;var r=n(13),a=void 0;try{}catch(t){}a||(a=function(t,e,n,o){this.src="",o&&this.add(o)},a.prototype={add:function(t){r.isArray(t)&&(t=t.join("")),this.src+=t},prepend:function(t){r.isArray(t)&&(t=t.join("")),this.src=t+this.src},toStringWithSourceMap:function(){return{code:this.toString()}},toString:function(){return this.src}}),i.prototype={isEmpty:function(){return!this.source.length},prepend:function(t,e){this.source.unshift(this.wrap(t,e))},push:function(t,e){this.source.push(this.wrap(t,e))},merge:function(){var t=this.empty();return this.each(function(e){t.add([" ",e,"\n"])}),t},each:function(t){for(var e=0,n=this.source.length;n>e;e++)t(this.source[e])},empty:function(){var t=this.currentLocation||{start:{}};return new a(t.start.line,t.start.column,this.srcFile)},wrap:function(t){var e=arguments.length<=1||void 0===arguments[1]?this.currentLocation||{start:{}}:arguments[1];return t instanceof a?t:(t=o(t,this,e),new a(e.start.line,e.start.column,this.srcFile,t))},functionCall:function(t,e,n){return n=this.generateList(n),this.wrap([t,e?"."+e+"(":"(",n,")"])},quotedString:function(t){return'"'+(t+"").replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")+'"'},objectLiteral:function(t){var e=[];for(var n in t)if(t.hasOwnProperty(n)){var i=o(t[n],this);"undefined"!==i&&e.push([this.quotedString(n),":",i])}var r=this.generateList(e);return r.prepend("{"),r.add("}"),r},generateList:function(t){for(var e=this.empty(),n=0,i=t.length;i>n;n++)n&&e.add(","),e.add(o(t[n],this));return e},generateArray:function(t){var e=this.generateList(t);return e.prepend("["),e.add("]"),e}},e.default=i,t.exports=e.default},function(t,e,n){"use strict";function o(t){a.default(t),l.default(t),u.default(t),d.default(t),f.default(t),g.default(t),y.default(t)}var i=n(8).default;e.__esModule=!0,e.registerDefaultHelpers=o;var r=n(22),a=i(r),s=n(23),l=i(s),c=n(24),u=i(c),p=n(25),d=i(p),h=n(26),f=i(h),m=n(27),g=i(m),v=n(28),y=i(v)},function(t,e,n){"use strict";function o(t){a.default(t)}var i=n(8).default;e.__esModule=!0,e.registerDefaultDecorators=o;var r=n(29),a=i(r)},function(t,e,n){"use strict";e.__esModule=!0;var o={methodMap:["debug","info","warn","error"],level:"info",lookupLevel:function(t){if("string"==typeof t){var e=o.methodMap.indexOf(t.toLowerCase());t=e>=0?e:parseInt(t,10)}return t},log:function(t){if(t=o.lookupLevel(t),"undefined"!=typeof console&&o.lookupLevel(o.level)<=t){var e=o.methodMap[t];console[e]||(e="log");for(var n=arguments.length,i=Array(n>1?n-1:0),r=1;n>r;r++)i[r-1]=arguments[r];console[e].apply(console,i)}}};e.default=o,t.exports=e.default},function(t,e,n){"use strict";e.__esModule=!0;var o=n(13);e.default=function(t){t.registerHelper("blockHelperMissing",function(e,n){var i=n.inverse,r=n.fn;if(e===!0)return r(this);if(e===!1||null==e)return i(this);if(o.isArray(e))return e.length>0?(n.ids&&(n.ids=[n.name]),t.helpers.each(e,n)):i(this);if(n.data&&n.ids){var a=o.createFrame(n.data);a.contextPath=o.appendContextPath(n.data.contextPath,n.name),n={data:a}}return r(e,n)})},t.exports=e.default},function(t,e,n){"use strict";var o=n(8).default;e.__esModule=!0;var i=n(13),r=n(12),a=o(r);e.default=function(t){t.registerHelper("each",function(t,e){function n(e,n,r){null!=t[e]&&(c&&(c.key=e,c.index=n,c.first=0===n,c.last=!!r,u&&(c.contextPath=u+e)),l+=o(t[e],{data:c,blockParams:i.blockParams([t[e],e],[u+e,null])}))}if(!e)throw new a.default("Must pass iterator to #each");var o=e.fn,r=e.inverse,s=0,l="",c=void 0,u=void 0;if(e.data&&e.ids&&(u=i.appendContextPath(e.data.contextPath,e.ids[0])+"."),i.isFunction(t)&&(t=t.call(this)),e.data&&(c=i.createFrame(e.data)),t&&"object"==typeof t)if(i.isArray(t))for(var p=t.length;p>s;s++)n(s,s,s===t.length-1);else{var d=void 0;for(var h in t)t.hasOwnProperty(h)&&(void 0!==d&&n(d,s-1),d=h,s++);void 0!==d&&n(d,s-1,!0)}return 0===s&&(l=r(this)),l})},t.exports=e.default},function(t,e,n){"use strict";var o=n(8).default;e.__esModule=!0;var i=n(12),r=o(i);e.default=function(t){t.registerHelper("helperMissing",function(){if(1!==arguments.length)throw new r.default('Missing helper: "'+arguments[arguments.length-1].name+'"')})},t.exports=e.default},function(t,e,n){"use strict";e.__esModule=!0;var o=n(13);e.default=function(t){t.registerHelper("if",function(t,e){return o.isFunction(t)&&(t=t.call(this)),!e.hash.includeZero&&!t||o.isEmpty(t)?e.inverse(this):e.fn(this)}),t.registerHelper("unless",function(e,n){return t.helpers.if.call(this,e,{fn:n.inverse,inverse:n.fn,hash:n.hash})})},t.exports=e.default},function(t,e,n){"use strict";e.__esModule=!0,e.default=function(t){t.registerHelper("log",function(){for(var e=[void 0],n=arguments[arguments.length-1],o=0;o <%- excerpt %> '),o=n(e);return o}},o=function(e,n){var o=e.tip(),i=o.find(".popover-content"),r=o.find("button");i.on("click",".tagfollow",function(o){r=$(o.target),r.hasClass("active")?(r.text("加关注").removeClass("active").attr("disabled","disabled"),$.post("/api/tag/"+n+"/follow/cancel",function(o){0===o.status&&e.tip().find(".followers").text(o.data+" 人"),r.removeAttr("disabled"),e.options.content=i.html(),t[n]=i.html()})):(r.text("已关注").addClass("active").attr("disabled","disabled"),$.post("/api/tag/"+n+"/follow",function(o){0===o.status&&e.tip().find(".followers").text(o.data+" 人"),r.removeAttr("disabled"),e.options.content=i.html(),t[n]=i.html()}))})},i=function(t,n,o){t.popover({template:' ',content:"loading...",html:!0,placement:"top",trigger:"hover",container:"body",delay:{show:1e3,hide:1e3}},n),t.one("show.bs.popover",function(){var t=$(this).data("bs.popover"),n=$(t.tip()),o=$(this).data("id");n.on("mouseenter",function(){var e=t.options.animation;t.options.animation=!1,t.show.call(t),t.enter(t),t.options.animation=e}),n.on("mouseleave",function(){t.leave(t)}),e(o,t)})};return $.fn.tagpopup=function(t,e,n){i(this,t,e,n)},i}),define("follow",["statusToggle","sfModal"],function(t,e){"use strict";return function(n){var o,i;o=$.extend({element:null,event:"click",url:null,toggleClass:"active",loadText:"加载中",unActiveText:"加关注",activeText:"取消关注",do:"follow",successFn:function(t){if(t.data.isEachFollowed)return $(this).text("相互关注")},failFn:function(t){var n;return"form"===t.data[0]?(n=Object.keys(t.data[1])[0],e(t.data[1][n])):e(t.data[1])}},n),i=n.element,t(i),i.on(o.event,function(){i.hasClass(o.toggleClass)?i.trigger("unactive",function(){i.text(o.unActiveText).removeClass(o.toggleClass).attr("disabled","disabled"),$.post(o.url+"/"+o.element.data("id")+"/"+o.do+"/cancel",function(t){0===t.status?o.successFn.call(this,t):(i.text(o.activeText),o.failFn.call(this,t)),i.removeAttr("disabled")})}):i.trigger("active",function(){i.text(o.activeText).addClass(o.toggleClass).attr("disabled","disabled"),$.post(o.url+"/"+o.element.data("id")+"/"+o.do,function(t){0===t.status?o.successFn.call(this,t):(i.text(o.unActiveText),o.failFn.call(this,t)),i.removeAttr("disabled")})})})}}),define("userFollow",["jquery","follow"],function(t,e){"use strict";t(".userfollow").each(function(){var n;return n=t(this),e({element:n,url:"/api/user",successFn:function(e){if(t(".profile__heading-info .h3").last().text(e.data.followers||e.data),e.data.isEachFollowed&&n.text("相互关注"),n.data("refresh"))return location.reload()}})}),t(".questionfollow").each(function(){var n;return n=t(this),e({element:n,url:"/api/question",activeText:"取消关注",successFn:function(e){if(n.data("callback")&&(n.parent().siblings("li").find(".follows").text(e.data),t(".funsCount").text(e.data)),n.data("refresh"))return location.reload()}})}),t(".blogfollow").each(function(){var n;return n=t(this),e({element:n,url:"/api/blog",activeText:"取消关注",successFn:function(e){if(n.data("callback")&&(n.parent().siblings("li").find(".follows").text(e.data),t(".funsCount").text(e.data)),n.data("refresh"))return location.reload()}})}),t(".bookmarkfollow").each(function(){var n;return n=t(this),e({element:n,url:"/api/bookmarkArchive",activeText:"取消关注",successFn:function(e){if(n.data("callback")&&(n.parent().siblings("li").find(".follows").text(e.data),t(".funsCount").text(e.data)),n.data("refresh"))return location.reload()}})})}),define("911",["main"],function(t){"use strict";var e,n,o,i,r,a,s,l,c,u,p,d,h,f,m,g,v,y,b,_,w,k,x;r=$("#911"),o=$("#reportForm"),n=r.find('[data-role="base"]'),c=r.find('[data-model="type"]'),a=r.find('[data-model="returnMsg"]'),e=r.find('[data-role="back"]'),s=r.find('[data-role="submit"]'),l=r.find('[data-model="type"]');var D=r.find('[data-model="action"]');i=n.find('[data-model="list"]'),p="",d="";var C="";h="",u=[],k=function(t){var e;return null!=t.subReason&&(u[t.value]=t.subReason),e='',e+="",e+=" "},x=function(t){var e,n;return e=t.isAccepted?"[解决] ":"",n='',n+="",n+=" "},y=function(t,e){var n,o;if(null!=t)return n=function(){var n,i,r;for(r=[],n=0,i=t.length;n'):(o="",n=y(t.subReason,k)),i=' "},b=function(t){return''},g=function(t,e){return $.ajax({type:"get",url:"/api/question/search",async:!0,data:{q:t},dataType:"json",success:function(t){var n;return"login"===t.data[0]?void r.modal("hide"):(n=y(t.data,x),void e.html(n))}})},f={subReason:function(t){var e;return e=$(v(t)),o.append(e),e},duplicate:function(t){var n,i,r,a,s={value:t};return a=$(v(s,!0)),o.append(a),n=a.find("input"),i=a.find('[data-model="list"]'),r=null,n.on("input",function(t){var e;e=$(this).val(),clearTimeout(r),r=setTimeout(function(){g(e,i)},1e3)}),e.hide(),a},"none-of-all":function(){var t;return t=$(b("custom")),$(this).parent().after(t),e.hide(),t}},w={show:function(t,e){a.text(t).slideDown("fast"),setTimeout(function(){w.hide(),e&&e()},3e3)},hide:function(){a.slideUp("fast")},reset:function(){a.hide().empty()}},_=function(t){var e,n,o=(t.type,t.typeText),r=t.actionText,a=t.reason;if(l.text(o),D.text(r),w.reset(),n=a,e=y(n,k),i.html(e),m&&m(n),$(".js-911-delete-tips").remove(),("answer"===t.type||"question"===t.type)&&"删除"===r&&window.config){var s=window.config["delete_"+t.type][1];$("#reportForm").append('注意:删除'+o+"将 "+s+" 声望
"),$("#reportForm").append('我们不建议删除带有答案的问题,因为这样做会剥夺未来读者的获取知识的权利。
')}},m=function(t){var n;n=[],r.on("click.911","input[type=radio]",function(t){var o;n.length>0&&(n[0]&&!$.contains(n[0][0],this)?(n[0].off().remove(),n.splice(0,2)):n[0]||n.splice(0,1)),o=$(this).data("action"),o?(n.unshift($(this)),"q-duplicate"===o?n.unshift(f[o]&&f[o].call(this,$(this).val())):n.unshift(f[o]&&f[o].call(this,$(this).data("reason")))):n.unshift(!1),n.some(function(t){return t})&&"none-of-all"!==o&&e.show()}),r.on("click.911",'[data-role="back"]',function(t){for(var e;!(e=n.shift()););e.off().remove(),n.shift().prop("checked",!1),0===n.length&&$(this).hide()}),r.on("click.911",'[data-role="submit"]',function(t){var e,n,i,a,s,l;if(e=o.serializeArray(),l=[],o.find("input[type=radio],textarea").each(function(t,e){var n;n=$(e).attr("name"),$.inArray(n,l)===-1&&l.push(n)}),e.length!==l.length)return void w.show("请完善理由");for(i=0,a=e.length;i应用内打开\n
经常删除已回答的问题可能会导致你的账户被降权。/g,">").replace(/"/g,""").replace(/'/g,"'"),e+=' "+r.title+''+r.publisher_id+"";for(var a=r.tag.split(","),s=0;s '+l+" ")})}();var T=$("#articleTitle").data("id");$(document).scroll(function(){var t=$(".loginBanner").length>0?$(".loginBanner").eq(0).offset().top:$("#footer").offset().top,e=$(".ad-should-be-fixed").height()+$(".side-outline").height(),n=Math.min(e,window.innerHeight);document.documentElement.scrollTop+n+30>=t?$(".side-outline,.ad-should-be-fixed").css("display","none"):$(".side-outline,.ad-should-be-fixed").css("display","block")}),"nd"===$(".article.fmt").data("license")&&$(".article.fmt").mouseup(function(t){var e,n,o,i;if($(".license-tooltip").remove(),e=t.pageX-75,n=t.pageY-45,o=window.getSelection().toString(),o.length)return i=$("\n\n"),$("body").append(i)}),D=!0,C=function(){if("false"===$.cookie("showRegister")&&"false"!==$.cookie("showRegister2")&&$(".widget-register").hasClass("hidden"))return $(".widget-register .container").html($("#regNext").html()),$(".widget-register").removeClass("hidden"),$(".widget-register .tomorrow").on("click",function(){return $.cookie("showRegister2","false",{expires:1,path:"/"}),$(".widget-register").addClass("widget-register-slideDown"),setTimeout(function(){$(".widget-register").remove()},1e3)})},$(document).scroll(function(){C(),$.cookie("showRegister")||($(".widget-register").removeClass("hidden"),$(".widget-register .tomorrow").on("click",function(){$.cookie("showRegister2")||$.cookie("showRegister2","true",{expires:1,path:"/"}),$.cookie("showRegister","false",{expires:1,path:"/"}),$(".widget-register").addClass("widget-register-slideDown")}))}),k=$("#articleTitle").data("id"),$("#sideBookmark, #mainBookmark").each(function(){$(this).click(function(){var t=$(this);t.hasClass("active")?i.editBookmark(t,function(t,e){0===e&&($("#sideBookmark, #mainBookmark, #side-widget-bookmarks-btn").each(function(){$(this).removeClass("active")}),$("#sideBookmarkText").text("收藏"),$("#mainBookmarkText").text("收藏")),$("#sideBookmarkNum").text(t.data),$("#mainBookmarkNum").text(t.data)}):i.addBookmark(t,function(t){$("#sideBookmark, #mainBookmark, #side-widget-bookmarks-btn").each(function(){$(this).addClass("active")}),$("#sideBookmarkText").text("已收藏"),$("#mainBookmarkText").text("已收藏"),$("#sideBookmarkNum").text(t.data),$("#mainBookmarkNum").text(t.data)})})}),f=$("#mainLike"),m=$("#sideLike");var P=$("#side-widget-votes-btn");E=$("#sideLikeNum"),A=$("#mainLikeNum");$("#mainLikeText"),$("#sideLikeText");r(f),r(m),$("#mainLike, #sideLike").each(function(){$(this).click(function(){var t;t=$(this),t.hasClass("active")?t.trigger("unactive",function(){$.post("/api/article/"+t.data("id")+"/like/cancel",function(e){t.html(t.data("old")),0===e.status&&(f.removeClass("active"),m.removeClass("active"),P.removeClass("stream__item-zan--active active"),$("#sideLikeNum").text(e.data),$("#mainLikeNum").text(e.data),$("#side-widget-votes-num").text(e.data),$("#sideLikeText").text("赞"),$("#mainLikeText").text("赞"))})}):t.trigger("active",function(){$.post("/api/article/"+t.data("id")+"/like",function(e){t.html(t.data("old"));0===e.status&&(f.addClass("active"),m.addClass("active"),P.addClass("stream__item-zan--active active"),$("#sideLikeNum").text(e.data),$("#mainLikeNum").text(e.data),$("#side-widget-votes-num").text(e.data),$("#sideLikeText").text("已赞"),$("#mainLikeText").text("已赞"))})})})}),$(".js__ops-action").click(function(){var t,e,n,o;return t=$(this),o=t.data(),e=t.text(),n="/api/article/"+o.id+"/"+o.action,a({title:"确认"+e,content:"您确认要"+e+"文章「"+o.title+"」吗?",doneFn:function(){return $.post(n,function(t){if(0===t.status)return window.location.reload()})}})}),$("#articleShow").click(function(){var t;t=$(this),a({title:"确认隐藏",content:"您确认要显示文章「"+t.data("title")+"」吗?",closeText:"取消",doneText:"显示",doneFn:function(){$.post("/api/article/"+t.data("id")+"/hide/cancel",function(t){0===t.status&&window.location.reload()})}})}),$("#articleRecommend, #cancelDel").click(function(){var t;t=$(this),$.sfAjax(t,function(){location.reload()})}),$("#articlePublish").click(function(){var t;t=$(this),$.post("/api/article/"+$(this).data("id")+"/publish",function(t){t.status||location.reload()})}),w=$(".widget-share__full").data("text"),_=[],$(".article.fmt img").each(function(){var t;return t=$(this).data("src"),!t||0!==t.indexOf("/image?src")&&0!==t.indexOf("/img/")||(t=location.origin+t),_.push(t)}),$(".tagPopup .tag").each(function(){var t;t=$(this).data("img"),t&&_.push(t)}),0===_.length&&_.push("http://tp1.sinaimg.cn/2036070420/180/40003289296/0"),y=$('meta[name="description"]').attr("content"),new s(".widget-share__full",{image:_.join("||"),text:"【"+w+"】分享自 @SegmentFault,文章传送门:",title:"【"+w+"】分享自 @SegmentFault,文章传送门:",networks:{renren:{title:w+" - SegmentFault",description:y+"... ",comment:""},douban:{title:w+" - SegmentFault",description:y+"... ",comment:""},twitter:{text:"【"+w+"】分享自@segment_fault,文章传送门:",title:"【"+w+"】分享自@segment_fault,文章传送门:"}}},!0),$(".article").find("h1, h2, h3").length&&($(".post-nav").show(),d(".article",".articleIndex"),0===$(".articleIndex li").length&&$(".widget-outline").remove()),S=void 0,h=$(".dont-likeweibo"),h.click(function(t){$.cookie("dontlikeShare",!0,{path:"/"})}),"#shareToWeibo"===location.hash&&(S="http://service.weibo.com/share/share.php?url="+encodeURIComponent(location.origin+location.pathname)+"&title="+encodeURIComponent("我在 @SegmentFault 发布了文章【"+$("#articleTitle a").text().trim()+"】,传送门:")+"&appkey=1742025894", $("#shareToWeiboModal").find("#shareLink").attr("href",S),$("#shareToWeiboModal").modal("show")),$("#reloadCaptcha").click(function(){$(this).find("img").attr("src","/user/captcha?w=178&h=35")}),b=$("#mail").val(),$("#user").submit(function(t){var e,n,o,i,r,a;t.preventDefault(),e=$(this),n=e.find("input").not("input[disabled]"),i=n.index($("input:focus")),r=n.slice(i+1),o=!1,r.length&&r.each(function(){var t,e;if(e=$(this).attr("type"),t=["text","email","password","url"],!$(this).val()&&t.indexOf(e)!==-1)return $(this).focus(),o=!0,!1}),o||(e.find("button[type=submit]").attr("disabled","disabled"),b=$("input[name=mail]").val(),a={mail:b,name:$("input[name=name]").val(),password:$("input[name=password]").val(),captcha:$("#captcha").val(),ref:$("input[name=ref]").val()},$.post("/api/user/register",a,function(t){e.find("button[type=submit]").removeAttr("disabled"),0===t.status?location.reload():($("#captcha").val(""),$("#reloadCaptcha img").attr("src","/user/captcha?w=178&h=35"),t.data[1].captcha&&($("#captcha").removeAttr("disabled"),$("#captcha").parents(".captcha-part").show()))}))}),$(".blog-follow").click(function(t){var e;t.preventDefault(),e=$(this),e.attr("disabled","disabled"),$.sfAjax(e,function(t){e.hasClass("active")?e.removeClass("active").find(".blog-text").text("关注"):e.addClass("active").find(".blog-text").text("已关注"),e.find(".blog-followers").text(t.data),e.removeAttr("disabled")})}),$(".follow-user").click(function(t){var e;t.preventDefault(),e=$(this),e.attr("disabled","disabled"),$.sfAjax(e,function(){e.hasClass("active")?e.removeClass("active").text("关注作者"):e.addClass("active").text("取消关注"),e.removeAttr("disabled")})}),$(".follow-article").click(function(t){var e;t.preventDefault(),e=$(this),e.attr("disabled","disabled"),$.sfAjax(e,function(){e.hasClass("active")?e.removeClass("active").text("关注专栏"):e.addClass("active").text("取消关注"),e.removeAttr("disabled")})});$(".article__reward-btn").on("click",function(){var t=$(".article__reward-btn").data("id"),e={type:1,prices:[2,5,10,20,50,100],price:2,title:"赞赏作者",api:"/api/article/"+t+"/reward",formData:{}};c(e)}),location.search.split("?").length>1&&location.search.split("?")[1].indexOf("pay")!=-1&&$(".article__reward-btn").length&&$(".article__reward-btn").trigger("click"),$(".article__reward-list-btn").popover({html:!0}).on("shown.bs.popover",function(){$(".article__reward-item").tooltip()});var B=new o({mod:"article"});if($("#SFEventObject").length>0){x=JSON.parse($("#SFEventObject").attr("value")),v=x.current[0],g=x.current[1];var I=x.root[0],L=x.root[1],F=function(){g.forEach(function(t,e){$("[data-id="+t+"]").addClass("highlight"),setTimeout(function(){},3e3),e||setTimeout(function(){$("html, body").scrollTop($("[data-id="+t+"]").offset().top)},100)})};"article"===I?"comment"===v&&F():B.unfoldCommentArea(L,F)}var j='\n \n ',O=$(".wrap").data("blogid"),M=function(){a({title:"申请开通赞赏",$content:j,doneText:"提交",doneFn:function(){var t=$(".form__reward-apply").serializeArray(),e={};t.map(function(t){e[t.name]=t.value}),$.post("/api/apply/reward",e,function(t){t.status||(location.href="/user/settings?tab=blog&id="+O)})}})},R=function(){a({modalSize:"modal-lg",title:"登录",doneText:"登录",hideClose:!0,hideDone:!0,hideFooter:!0,content:$("#loginModal").text(),show:function(){return window.ga&&ga("send","event","login modal","show","login modal"),$("[name=mail]").first().focus(),$("#loginShowMore").click(function(t){t.preventDefault(),$(this).hide(),$(this).siblings().removeClass("hidden")}),$(".sfmodal .widget-login a").click(function(t){t.preventDefault(),window.open($(this).attr("href"),"_blank","toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=600,height=500")}),$("#loginReloadCaptcha").click(function(){$(this).find("img").attr("src","/user/captcha?w=240&h=50")})}}),$(".register-mail").typeHelperOld({emailMode:!0,onlyResult:!1})};t={reward:M,login:R,userId:$("#SFUserId").attr("value")},$(".post__reward--application-btn").on("click",function(e){var n=Boolean($(this).data("phone"));n?t.reward():a({modalSize:"modal-md",title:"绑定手机号",doneText:"下一步",content:$("#bindPhoneModal").text(),doneFn:function(){var e=$(".form__bindphone-apply").serializeArray(),n={};e.map(function(t){n[t.name]=t.value}),$.post("/api/user/phone/bind/check",n,function(e){e.status||t.reward()})}})}),$(".widget-share__full > div:first").remove(),$("table,svg").each(function(t,e){var n=$(this),o=n.width()>n.closest(".row").children().first().width();0==n.closest(".table-wrap").length&&o&&n.wrap('')}),$(".fa-weixin").popover({html:!0,content:'\n \n ',trigger:"hover"}),$(".fa-weixin").on("shown.bs.popover",function(){var t=$(".widget-share__full").data("url");t+=t.includes("share_user")?"&utm_source=Wechat&utm_medium=shareLink":"?utm_source=Wechat&utm_medium=shareLink",console.log(t),$("#side-widget-weixin-share").qrcode({text:t,width:120,height:120})}),$("#side-widget-votes-btn").on("click",function(){return $("#mainLike").trigger("click"),!1}),$("#side-widget-bookmarks-btn").on("click",function(){return $("#mainBookmark").trigger("click"),!1}),$(".fa-weibo").on("click",function(){return $('[data-network="weibo"]').trigger("click"),!1}),$(".fa-twitter").on("click",function(){return $('[data-network="twitter"]').trigger("click"),!1}),$(".fa-facebook").on("click",function(){return $('[data-network="facebook"]').trigger("click"),!1}),$(document).scroll(function(){$(document).scrollTop()>$(".article__content").height()+$(".article__content").offset().top?$(".side-widget").hide():$(".side-widget").show(),$(window).scrollTop()>$(window).height()?$(".fa-arrow-up").removeClass("hidden"):$(".fa-arrow-up").addClass("hidden")}),$(".fa-arrow-up").on("click",function(){$(window).scrollTop(0)});var q,N,U,z,H,W,Y;U=$("#seo"),q=U.find('[data-model="returnMsg"]'),z=$("#seoForm"),H=U.find("[name=title]"),W=U.find("[name=desc]"),Y=U.find("[name=keywords]"),N={show:function(t,e){q.text(t).slideDown("fast"),setTimeout(function(){N.hide(),e&&e()},3e3)},hide:function(){q.slideUp("fast")},reset:function(){q.hide().empty()}},N.hide(),U.on("shown.bs.modal",function(t){$.get("/api/article/"+k+"/seo",function(t){if(0===t.status){var e=t.data;H.val(e.title),W.val(e.desc),Y.val(e.keywords)}else if("login"===t.data[0])U.modal("hide");else{var n="";for(var o in t.data[1])n+=t.data[1][o];N.show(n)}},"json")}),U.on("click.seo",'[data-role="submit"]',function(t){var e,n,o,i,r,a;if(e=z.serializeArray(),a=[],z.find("textarea").each(function(t,e){var n;n=$(e).attr("name"),$.inArray(n,a)===-1&&a.push(n)}),e.length!==a.length)return void N.show("请完善填写数据");for(o=0,i=e.length;o如需转载,请先联系作者
\n \n \n <%- isLiked?\'已\':\'\' %>赞\n <%- votes>0?\'+\'+votes:\'\' %>\n \n \n\n \n \n \n \n
\n\n \n\n